A self-contained guide to basic linear algebra ideas that commonly come up in robotics.
Basics
A matrixA∈Rm×n represents a linear map A:Rn→Rm.
For example, a robot Jacobian J∈Rm×n maps joint velocity q˙∈Rn to task-space velocity x˙∈Rm, x˙=Jq˙.
Transpose
The transpose of matrix A∈Rm×n satisfies:
A⊤∈Rn×m
(A⊤)ij=Aji
💡 Fact:(AB)⊤=B⊤A⊤.
Proof: The (i,j)-entry of (AB)⊤ is: (AB)ij⊤=(AB)ji. By matrix multiplication, (AB)ji=k∑AjkBki. Also, (B⊤A⊤)ij=k∑(B⊤)ik(A⊤)kj=k∑BkiAjk=(AB)ji.
Column space
Suppose A is a matrix with a1,a2,…,an as its column vectors. Then Ax=x1a1+⋯+xnan.So every possible output Ax is a linear combination of the columns of A.
The column space is Col(A)={Ax:x∈Rn}.
Intuitively, the column space tells us which output directions the matrix can generate.
🔑 For a Jacobian, Col(J) is the set of task-space velocities that the robot can instantaneously produce.
Rank
The rank of A is the dimension of its column space: rank(A)=dimCol(A).
i.e. it is the number of linearly independent columns.
There is a theorem that says column rank(A)=row rank(A).
🔑 Intuitively, rank measures "how many independent directions" a matrix contains.
Theorem. The rank cannot exceed the number of rows or columns, i.e. rank(A)≤min(m,n) for A∈Rm×n.
This makes sense: we cannot have more than m linearly independent vectors in Rm, and the columns of A live in Rm.
Null space
The null space of Null(A)={x:Ax=0}. It is also referred to as the kernel, i.e. ker(A).
These are the input directions that the matrix "kills."
💡 For a robot Jacobian, Jq˙=0 means the joints can move with velocity q˙ while producing no instantaneous end-effector motion (redundancy!)
The dimension of the null space is called the nullity: nullity(A)=dimNull(A).
Rank-nullity theorem
For A∈Rm×n, rank(A)+nullity(A)=n.
Proof: Fill in later.
Invertibility and full rank
For a square matrix A∈Rn×n, the following statements are equivalent: A invertible⟺rank(A)=n⟺Null(A)={0}.
Trivial null space implies full rank: rank(A)+0nullity(A)=n⟹rank(A)=n.
Full rank implies invertibility: For every n×n matrix, rank n means its n columns are linearly independent. They therefore form a basis of Rn. Thus, for every b, Ax=b has exactly one solution, i.e. A−1Ax=A−1b exists and is unique.
For a square matrix, singular means not invertible.
Key identities
🔑 x⊤A⊤Ax=∣∣Ax∣∣2
Proof: Using (Ax)⊤=x⊤A⊤, we get x⊤A⊤Ax=(Ax)⊤(Ax).For any vector y, y⊤y=∣∣y∣∣2. Hence x⊤A⊤Ax=∣∣Ax∣∣2.
🔑 Null(A⊤A)=Null(A)
Proof: We prove both inclusions.
Direction 1: Suppose x∈Null(A). Then Ax=0. Therefore A⊤Ax=A⊤0=0⟹x∈Null(A⊤A)⟹Null(A)⊆Null(A⊤A).
Direction 2: Suppose x∈Null(A⊤A). Then A⊤Ax=0. Multiply on the left by x⊤: x⊤A⊤Ax=(Ax)⊤Ax=∣∣Ax∣∣2=0⟹Ax=0⟹x∈Null(A)⟹Null(A⊤A)=Null(A).This uses the fact that a vector has norm zero only if it is the zero vector.
Hence Null(A⊤A)=Null(A).
🔑 rank(A⊤A)=rank(A)
Proof: Both A:Rn→Rm and A⊤A:Rn→Rn have the same domain dimension n. We just proved that they have the same null space, so they have the same nullity. Therefore: rank(A)=n−nullity(A)=n−nullity(A⊤A)=rank(A⊤A).
🔑 rank(AA⊤)=rank(A)
Proof: Applying the above fact, rank(AA⊤)=rank(A⊤)=rank(A).This uses the fact that rank(A⊤)=rank(A), which follows directly from the theorem that row rank(A)=column rank(A).
Relevant definitions used in this section
The squared norm of a vector is the sum of the squares of its entries. If y=[y1y2⋯yn], then its Euclidean norm is ∣∣y∣∣=y12+y22+⋯+yn2. So its squared norm is ∣∣y∣∣2=y12+⋯+yn2.
General rank inequality
rank(AB)≤min(rank(A),rank(B))
Symmetric matrices
Positive semidefinite matrices
Jacobian facts
Now that we've established some basic linear algebra facts, we can apply them to the robot Jacobian!
🔖 J⊤J is always singular for a redundant Jacobian.