Module 2: Matrices Lesson 1 of 3

Matrix Fundamentals

Matrices are rectangular arrays of numbers that represent linear transformations, systems of equations, and robot configurations. They’re fundamental to describing how robots move and transform through space.

What is a Matrix?

A matrix is a 2D array of numbers arranged in rows and columns:

A=[a11a12a13a21a22a23]A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \end{bmatrix}

This is a 2×3 matrix (2 rows, 3 columns). We denote the element in row i and column j as aij.

Matrix Dimensions

Robot Configuration Matrix Robotics Application

A 6-DOF robot arm’s joint angles can be represented as a column vector (6×1 matrix):

q=[θ1θ2θ3θ4θ5θ6]\mathbf{q} = \begin{bmatrix} \theta_1 \\ \theta_2 \\ \theta_3 \\ \theta_4 \\ \theta_5 \\ \theta_6 \end{bmatrix}

where θ₁ through θ₆ are the joint angles.

Basic Matrix Operations

Matrix Addition

Add corresponding elements. Matrices must have the same dimensions.

[1234]+[5678]=[681012]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} + \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} = \begin{bmatrix} 6 & 8 \\ 10 & 12 \end{bmatrix}

Matrix Subtraction

Subtract corresponding elements (same dimension requirement).

Scalar Multiplication

Multiply every element by a scalar (number):

3×[1234]=[36912]3 \times \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} = \begin{bmatrix} 3 & 6 \\ 9 & 12 \end{bmatrix}

Transpose

The transpose of a matrix swaps rows and columns:

A=[123456],AT=[142536]A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}, \quad A^T = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix}

The element at position (i, j) in A becomes position (j, i) in AT.

Properties of Transpose

  • (AT)T = A
  • (A + B)T = AT + BT
  • (cA)T = c AT (for scalar c)

Special Matrices

Identity Matrix

The identity matrix I is a square matrix with 1s on the diagonal and 0s elsewhere:

I3=[100010001]I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}

It acts like the number 1: AI = IA = A.

Zero Matrix

All elements are zero. Acts like the number 0 in addition.

Diagonal Matrix

Non-zero elements only on the diagonal:

D=[d1000d2000d3]D = \begin{bmatrix} d_1 & 0 & 0 \\ 0 & d_2 & 0 \\ 0 & 0 & d_3 \end{bmatrix}

Joint Velocity Limits Robotics Application

A diagonal matrix can represent maximum joint velocities for a robot:

q˙max=[90°000120°000180°] per second\dot{\mathbf{q}}_{\text{max}} = \begin{bmatrix} 90° & 0 & 0 \\ 0 & 120° & 0 \\ 0 & 0 & 180° \end{bmatrix} \text{ per second}

Each joint has independent velocity limits (no coupling between joints).

Interactive Explorer

Try the basic matrix operations below. Adjust the matrix elements and see how operations work in real-time.

Matrix A

Matrix B

Controls

Show Operations

Results

A + B

6.00 8.00 10.00 12.00

Matrix Operations: Addition and subtraction work element-wise. Scalar multiplication scales all elements. Transpose swaps rows and columns (reflects across diagonal).

Key Takeaways

  1. Matrices represent linear transformations and store robot configurations
  2. Addition/subtraction work element-wise (same dimensions required)
  3. Scalar multiplication scales all elements uniformly
  4. Transpose reflects the matrix across its diagonal
  5. Identity matrix acts as “1” in matrix algebra

Next Steps

Now that you understand basic matrix operations, we’ll explore matrix multiplication — the key operation for composing transformations and understanding robot kinematics.