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:
This is a 2×3 matrix (2 rows, 3 columns). We denote the element in row i and column j as aij.
Matrix Dimensions
- Square matrix: Same number of rows and columns (e.g., 2×2, 3×3)
- Column vector: n×1 matrix (single column)
- Row vector: 1×n matrix (single row)
Robot Configuration Matrix Robotics Application
A 6-DOF robot arm’s joint angles can be represented as a column vector (6×1 matrix):
where θ₁ through θ₆ are the joint angles.
Basic Matrix Operations
Matrix Addition
Add corresponding elements. Matrices must have the same dimensions.
Matrix Subtraction
Subtract corresponding elements (same dimension requirement).
Scalar Multiplication
Multiply every element by a scalar (number):
Transpose
The transpose of a matrix swaps rows and columns:
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:
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:
PD Controller Gain Matrix Robotics Application
A diagonal matrix naturally represents proportional gains in a PD controller for a 3-joint robot:
The control torque is computed as , where is the joint angle error vector. Each diagonal entry scales the error for one joint independently — this is a genuine matrix-vector multiplication used in every robot controller.
Linear Independence and Rank
Two concepts that are essential for understanding why matrices sometimes fail to be invertible.
Linear Independence
A set of vectors is linearly independent if no vector in the set can be written as a combination of the others. Intuitively, each vector adds a genuinely new direction.
Independent — each vector points in a distinct direction:
Dependent — one vector is just a scaled version of the other:
When vectors are dependent, they span fewer dimensions than you’d expect. Two dependent 2D vectors only cover a line, not the full plane.
Rank
The rank of a matrix is the number of linearly independent columns (equivalently, rows). A matrix is full rank when all its columns are independent.
For an n×n square matrix:
- Full rank (rank = n): The matrix is invertible, det ≠ 0
- Rank-deficient (rank < n): The matrix is singular, det = 0, columns are dependent
This is why singular matrices collapse space — dependent columns mean redundant directions, so the transformation squashes at least one dimension away.
Rank in Robotics
The Jacobian matrix of a robot maps joint velocities to end-effector velocities. Its rank tells you how many independent directions the end-effector can move:
- Full rank: The robot can move in all directions — full dexterity
- Rank drops: The robot loses control in one or more directions — this is a singularity
When we say “the Jacobian is singular,” we mean its columns have become linearly dependent, and the rank has dropped below its maximum value.
Interactive Explorer
Try the basic matrix operations below. Adjust the matrix elements and see how operations work in real-time.
Matrix A
Matrix B
Show Operations
Results
A + B
Matrix Operations: Addition and subtraction work element-wise. Scalar multiplication scales all elements. Transpose swaps rows and columns (reflects across diagonal).
Key Takeaways
- Matrices represent linear transformations and store robot configurations
- Addition/subtraction work element-wise (same dimensions required)
- Scalar multiplication scales all elements uniformly
- Transpose reflects the matrix across its diagonal
- Identity matrix acts as “1” in matrix algebra
Practice Problems
-
Compute and for , .
-
Find for the 2×3 matrix . What are the dimensions of ?
-
Are these vectors linearly independent? , ,
-
A 2-joint robot’s Jacobian has columns and . What is the rank? Is the robot at a singularity?
Answers
-
,
-
. Dimensions: 3×2 (rows and columns swap).
-
No — , so and are dependent. (Even though is independent of , the set as a whole is dependent.)
-
Both columns are multiples of — they point in the same direction. Rank = 1 (not full rank). Yes, the robot is at a singularity — it can only produce end-effector motion along the x-axis.
Next Steps
Now that you understand basic matrix operations, we’ll explore matrix multiplication — the key operation for composing transformations and understanding robot kinematics.