Linear Algebra · Theory · M3
M3-T5 — Column Space and Null Space
The column space says what a matrix can reach. The null space says what it cannot see. Together they describe a mechanism or a sensor completely.
Two questions about any linear device decide what it is good for: which outputs can it produce, and which inputs does it ignore? For a robot arm these are the hand motions it can make and the joint motions that leave the hand still. For a sensor they are the quantities it measures and the ones it is blind to.
Learning objectives
After this lesson, you should be able to:
- Define the column space and null space and compute a basis for each of a small matrix.
- State and apply the rank-nullity relation dim C(A) + dim N(A) = n.
- Decide whether a given b lies in the column space, i.e. whether A x = b is solvable.
- Interpret the two spaces as reachable outputs and invisible inputs for arms and sensors.
Introduction and motivation
A manipulator Jacobian turns joint motions into hand motions. Its column space is the set of hand velocities the arm can produce; its null space is the set of joint motions that do not move the hand at all (the arm can reconfigure itself without disturbing its task). A sensor model z = H x has a column space of measurable combinations and a null space of unobservable state changes. These two sets decide capability and blindness, so you will use them in robotics constantly.
The intuition
Feed a matrix every possible input. The column space is the collection of all outputs it can ever produce, which by the column view of the earlier lesson is every combination of its columns. The null space is the collection of inputs that come out as zero: inputs the matrix cannot see.
Interactive figure. The two columns of a two by two matrix drawn as arrows. When parallel the column space is a line and a null space line of inputs sent to zero appears. When independent the column space is the whole plane and the null space is just the zero vector. This figure needs JavaScript to be interactive.
Geometric and physical interpretation
Geometric view. The column space is a subspace of the output space (a line, a plane, …) and the null space a subspace of the input space. The matrix squashes the null space to a point (zero) and maps the rest of the input space onto the column space, with nothing outside it reached. Physical view. For an arm, the column space of the Jacobian is the set of achievable hand velocities; for a redundant arm the null space is a family of “self-motions”, elbow swings that leave the hand where it is. For a sensor, the null space is the unobservable part of the state.
The mathematics
- C(A)
- the column space of A: all vectors A x as x varies. A subspace of Rm.
- N(A)
- the null space of A: all x with A x = 0. A subspace of Rn.
- r
- the rank of A.
Definitions
C(A) = { A x : x in R^n } = span of the columns of A N(A) = { x : A x = 0 }What it means. C(A) is the set of reachable outputs (all mixes of the columns); N(A) is the set of inputs that produce no output. Both contain the zero vector and both are closed under sums and scalar multiples, which is what makes them subspaces.
Solvability
A x = b has a solution ⇔ b is in C(A)
What it means. A x is always a combination of the columns, so b can be produced exactly when it is such a combination.
Rank-nullity
dim C(A) + dim N(A) = n dim C(A) = r, dim N(A) = n − r
What it means. Each input dimension either reaches an independent output direction (counted in r) or is squashed to zero (counted in n − r). Nothing else can happen to it.
Column space = what A can produce. Null space = what A cannot see. Their dimensions are r and n − r.
Step-by-step derivation: computing both spaces, and why the dimensions add up
Computing both from elimination. For A = [[1, 2, 3], [2, 4, 6]]:
- Eliminate.
R2 − 2R1 = (0, 0, 0), so the echelon form is[[1, 2, 3], [0, 0, 0]]: one pivot, in column 1. Sor = 1. - Column space. The pivot column of the original matrix,
(1, 2), is a basis forC(A)(the other columns are multiples:(2, 4) = 2·(1, 2)and(3, 6) = 3·(1, 2)). SoC(A)is the line through (1, 2). - Null space. Solve
A x = 0. The only equation left isx₁ + 2x₂ + 3x₃ = 0. Columns 2 and 3 have no pivots, sox₂andx₃are free; setx₂ = s,x₃ = t, thenx₁ = −2s − 3t. - Write the solution as a combination:
x = s(−2, 1, 0) + t(−3, 0, 1). The vectors(−2, 1, 0)and(−3, 0, 1)are independent and spanN(A), sodim N(A) = 2 = n − r.
Why rank-nullity holds in general. After elimination every column is either a pivot column or a free column. Pivot columns number r and are independent, giving dim C(A) = r. Each of the n − r free columns contributes exactly one free variable, and each free variable contributes one basis vector of the null space (set that variable to 1 and the other free variables to 0, then solve for the pivot variables). So dim N(A) = n − r, and the dimensions add up to the n columns.
The null space is a subspace. If A x = 0 and A y = 0 then A(x + y) = 0 and A(cx) = 0, so sums and multiples of null-space vectors stay in it. That is why it is described by a basis and not just a list of solutions.
A worked example: reachable outputs and invisible inputs
Take A = [[1, 2, 3], [2, 4, 6]], as in the derivation.
- Rank and dimensions.
r = 1,n = 3, sodim C(A) = 1anddim N(A) = 2; and1 + 2 = 3✓. - Check the null space.
A (−2, 1, 0) = (−2 + 2 + 0, −4 + 4 + 0) = (0, 0)andA (−3, 0, 1) = (−3 + 0 + 3, −6 + 0 + 6) = (0, 0). ✓ - Solvability. Is
b = (3, 6)reachable? It is 3·(1, 2), so yes: for instancex = (3, 0, 0). Isb = (3, 5)reachable? It is not a multiple of (1, 2), soA x = (3, 5)has no solution. - A full-rank example.
[[1, 0], [0, 1], [1, 1]](3 × 2) has rank 2, soC(A)is a plane in R³ andN(A) = {0}: no non-zero input is ignored, but outputs outside that plane (for example (0, 0, 1)) cannot be reached.
Robotics application
Manipulator capability. The Jacobian's column space is the set of hand velocities the arm can produce at a given pose; when it loses rank, that set shrinks. Its null space, for arms with more joints than task dimensions, is the family of internal motions that leave the hand fixed (Module 8, null-space control). See frames and poses for navigation for the mobile-robot analogue of velocity spaces.
Observability. For a sensor z = H x the null space of H contains the state changes that leave every measurement unchanged: unobservable directions. A classic one is the global heading of a robot equipped only with relative sensors: rotating the entire trajectory changes nothing the sensors see. Estimators must be designed to live with that null space (a gauge freedom), as discussed for pose graphs.
Calibration ambiguity. If the data matrix of a calibration has a non-trivial null space, there is a family of parameter vectors that explain the data equally well; any one of them can be added to another without changing the fit.
Actuation. The column space of a thrust-allocation matrix is the set of demands the aircraft can produce; a demand outside it (for example sideways thrust for a fixed-wing aircraft) is simply infeasible.
Engineering implications and limitations
Practical rules
- Compute with the SVD, not by hand. The singular value decomposition (Module 6) gives orthonormal bases of both spaces and tells you numerically which singular values count as zero.
- A null space makes solutions non-unique. If N(A) contains non-zero vectors, any solution of A x = b can be shifted by them. Decide what extra criterion picks one (smallest norm, closest to a preferred posture).
- Null spaces are not noise. Do not “fix” a rank-deficient problem by adding a tiny constant to the diagonal without understanding which physical freedom it hides.
- Feasibility is a column-space question. Before solving for actuator commands, check that the demand is in the column space (or accept the closest reachable demand).
- Tolerance matters. “Zero” singular values are small numbers. Choose the tolerance from the sensor noise and the scale of the problem.
Limits
The null space as defined here describes linear problems. For a nonlinear robot the Jacobian's null space is only the set of first-order self-motions at one pose, and it changes from pose to pose.
Common misconceptions
“The null space is the set of zero entries of the matrix.”
It is a set of input vectors that A sends to zero, unrelated to which entries of A are zero.
“The column space is just the columns.”
It is every combination of them. The columns are a spanning set; the column space also includes all their sums and multiples.
“If the null space is not just {0}, the matrix is useless.”
It simply cannot distinguish certain inputs. A redundant arm with a null space is more capable, not less: the null space is the freedom to reconfigure.
“The null space and column space live in the same space.”
The null space is in the input space Rn and the column space in the output space Rm, which may even have different dimensions.
Engineering takeaways
- The column space C(A) is everything A can output (all combinations of its columns); the null space N(A) is every input A sends to zero.
- A x = b is solvable exactly when b is in C(A).
- Rank-nullity: dim C(A) = r and dim N(A) = n − r, so they add up to n.
- The null space is spanned by one basis vector per free variable after elimination.
- For robots: the column space is reachable outputs, the null space is invisible or self-motion inputs.
References and further reading
Primary papers and authoritative documentation.
- MIT 18.06SC Linear Algebra (OCW): lectures on the column space, null space and solving A x = 0
- 3Blue1Brown, Essence of Linear Algebra: column space and null space
- Modern Robotics (Lynch and Park), free preprint: chapter 5: the Jacobian and the arm's velocity capabilities
- Axler, Linear Algebra Done Right: the rank-nullity theorem in its abstract form
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
For A = [[1, 1, 0], [0, 1, 1]] find the rank, a basis for the null space, and say whether b = (2, 3) is in the column space.
Explanation
Rows are independent, so the rank is 2 (pivots in columns 1 and 2). The free variable is x₃ = t: row 2 gives x₂ = −t and row 1 gives x₁ = −x₂ = t, so the null space is spanned by (1, −1, 1). Check: A(1, −1, 1) = (0, 0). Since the rank equals the number of rows (2), the columns span all of R², so b = (2, 3) is in the column space (one solution is x = (−1, 3, 0)).
Question 2
A 7-joint arm positions a hand in 3D (a 3 × 7 Jacobian of rank 3). What are the dimensions of its column space and null space, and what does the null space mean physically?
Explanation
dim C(J) = 3 (all hand velocities are achievable) and dim N(J) = 7 − 3 = 4. The null space is a four-dimensional family of joint velocities that leave the hand velocity unchanged: self-motions such as swinging the elbow, which can be used to avoid obstacles or joint limits while the hand holds its position.
Question 3
A robot's state has three components, but the measurement matrix H of its sensors has a null space spanned by (0, 0, 1). Which direction in the state is unobservable and what can you conclude about the rank of H?
Explanation
Any change of the state along (0, 0, 1) produces zero change in every measurement, so the third state component cannot be estimated from these sensors alone. rank(H) = 3 − 1 = 2 by rank-nullity: only two independent combinations of the state are measured. A different sensor (or a prior) is needed for the third.
What’s next
A matrix has two more subspaces, the row space and the left null space. Together with the two you have just met they form a complete picture, and their orthogonality explains redundancy and consistency.
Related content
Nothing below is required to finish this lesson.
- BeforeM3-T4: Rank and Linear Independence
Decide whether vectors are independent, compute the rank, and connect it to the information a set of sensors carries.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.