A matrix with determinant zero flattens the space it acts on, and the useful questions are what exactly gets flattened and what is left.
The previous lesson gave a yes or no answer to invertibility. That is not enough, for two reasons. A three by three matrix can collapse space onto a plane, onto a line or onto the origin, and all three have determinant zero. And most matrices in practice are not square at all: fitting a straight line to fifty measurements produces a fifty by two matrix, which has no determinant and no inverse, and yet the system is not hopeless.
Two subspaces belong to every matrix
Let be an by matrix, so it maps to .
The column space of , written , is the span of its columns. Since is the combination of the columns weighted by the components of , the column space is exactly the set of vectors of the form : everything the transformation can reach. It lives in , the output space.
The null space of , written , is the set of with : everything the transformation destroys. It lives in , the input space.
Both are subspaces, by the test from the lesson on bases. The column space is a span, so it is one automatically. The null space is closed under both operations because and , which is linearity doing the work.
Take a concrete matrix and keep it for the rest of the lesson:
Its second column is twice its first, so the columns are dependent and the matrix is singular. The column space is the span of and , which are not multiples of each other, so it is a plane in : the transformation squashes all of space onto that plane. For the null space, solve . Because the first two columns are parallel, the equation reads , and since those two vectors are independent both coefficients must vanish: and . So the null space is the line spanned by , and indeed .
A whole line of inputs is sent to the origin, and a whole plane of outputs is reachable. One dimension was destroyed and two survived, which is the shape of the answer this lesson formalises.
Rank
The rank of is the dimension of its column space, written . It counts how many genuinely different directions the columns supply, which is how many independent directions survive the transformation. The example above has rank two.
Rank is found by elimination rather than by inspection. Row reducing produces a staircase in which each step begins with a pivot, the first non-zero entry of its row, and the number of pivots is the rank. Columns carrying a pivot are called pivot columns and correspond to independent columns of the original matrix; the others are free columns, each of them a combination of the pivot columns to its left.
The nullity is the dimension of the null space. Each free column supplies exactly one basis vector of the null space, obtained by setting that free variable to one, all other free variables to zero, and solving back for the pivot variables. The example has one free column, the second, and correspondingly one null space basis vector.
That correspondence proves the central counting theorem, since every column is either a pivot column or a free one and no column is both:
the number of columns. This is the rank-nullity theorem, and it is a conservation law: the input space has dimensions, the map destroys the nullity of them and delivers the rank of them to the output, and the two numbers always add back to . For the example, .
Example. Find the rank and nullity of , a two by three matrix.
Every column is a multiple of , so the column space is a line in and the rank is . There are three columns, so the nullity is : a whole plane of inputs collapses to the origin. One check: gives the null vector , and gives , and those two are independent.
Now you. Find the rank and nullity of .
Answer
The first two columns already span , so the rank is and the nullity is . The null vector satisfies , giving and , so the null space is spanned by .
The complete solution of a system
Now return to with the tools assembled.
Existence. A solution exists exactly when lies in the column space, since the column space is precisely the set of reachable vectors. For the example matrix, take , which is column one plus column three, so it is reachable and is a solution. Now take . Reaching it needs , and the first component forces , the second then forces , and the third would need , which is false. That target is off the plane and no solution exists.
Uniqueness. If is one solution and is any null space vector, then , so is also a solution. Conversely if and are both solutions then , so they differ by a null space vector. Hence the complete solution set is
one particular solution plus the whole null space. Geometrically it is a copy of the null space, shifted away from the origin by . It is not a subspace unless , since it misses the origin, which is why homogeneous systems are the well-behaved ones.
For the example with , the complete solution is for any . Checking at : the input gives , as promised.
Every statement of the first lesson now has a reason. No solution means outside the column space. Exactly one means the null space is , that is, nullity zero, that is, rank equal to the number of columns. Infinitely many means a non-trivial null space, and the solution set then has the dimension of that null space, so it is a line, a plane or larger, never a scattering of isolated points.
Example. With as above, solve completely.
Is it reachable? Solve : the first component gives , the second so , and the third checks, . So is one solution, using two of column one and one of column three. The complete solution is , a line of solutions.
Now you. A five by eight matrix has rank three. What is the dimension of its null space, and can be solved for every in ?
Answer
Nullity is , by rank-nullity with columns. The column space has dimension three inside , so it is not all of and most targets are unreachable. When a solution does exist it is never unique, since a five-dimensional family of null vectors can be added to it.
Tall, wide and square
The shape of a matrix bounds its rank, since the rank cannot exceed either the number of columns or the number of rows: the column space is spanned by columns and lives inside . So , and a matrix achieving that bound is said to have full rank. Three cases are worth separating, because each is a different practical situation.
A tall matrix, with , has more equations than unknowns. At best , in which case the columns are independent, the null space is trivial and any solution is unique, but the column space is an -dimensional sliver of and almost every misses it. Overdetermined systems are usually unsolvable and never have more than one solution. That is the case fitting a line to fifty data points produces.
A wide matrix, with , has more unknowns than equations. At best , in which case the column space is all of and every is reachable, but rank-nullity forces a null space of dimension , so solutions always come in infinite families. Underdetermined systems are usually solvable and never uniquely. A structure with more supports than the equilibrium equations can determine is in exactly this situation, and engineers call it statically indeterminate.
A square matrix of full rank is the invertible case of the previous lesson, where existence and uniqueness both hold. It is the only shape that can manage both, and even then only when the rank is full.
Example. A by matrix has rank . What are the dimensions of its null space and column space, and what does that say about solving ?
The null space has dimension , so the only vector sent to the origin is and a solution, if one exists, is unique. The column space has dimension inside , a plane in a fifty-dimensional space, so a assembled from measurements will not lie in it and no exact solution exists.
Now you. A by matrix has rank . Can always be solved, and is the solution ever unique?
Answer
The column space has dimension inside , so it is all of and every is reachable. But the nullity is , so every solution comes with a four-dimensional family of others. Always solvable, never uniquely.
Row rank equals column rank
The rows of span a subspace of called the row space, and its dimension is the row rank. There is no obvious reason for it to match the column rank, since the rows and columns of a rectangular matrix are different objects living in different spaces, and yet:
The reason is elimination. Row operations do not change the row space, since each new row is a combination of old ones and the process is reversible. Row operations also do not change which combinations of columns vanish, since each equation is transformed into an equivalent one, so they preserve the null space and therefore the column rank as well. In the reduced staircase form, both ranks are visibly the number of pivots. Counting pivots therefore counts both.
For the example matrix, the rows are , and , and the third is the sum of the first two, so the row space is two-dimensional, matching the column rank of two.
One more consequence deserves stating, since it is where orthogonality enters. Every row of , dotted with any null space vector , gives zero, because that dot product is one component of . So the null space is perpendicular to the row space. Check it: the null vector dotted with gives , with gives , and with gives .
The two spaces have dimensions and and sit at right angles inside , splitting the input space between them. The same argument applied to splits the output space into the column space, of dimension , and the null space of , of dimension , which is what is left unreachable. For the example, , and the unreachable direction is spanned by : dotting it with each column gives , and . Anything with a component along cannot be produced, which is precisely why failed earlier.
These four subspaces, with dimensions , , and , are the full anatomy of a matrix.
Honest limits
Rank is exact in theory and delicate in practice. The matrix with columns , and has rank two, but change one entry from to and the columns become independent, giving rank three. Real measurements always contain such perturbations, so a matrix built from data is almost always of full rank arithmetically while being close to a lower-rank one. Numerical software therefore reports the number of singular values above a tolerance, using the decomposition mentioned in the last lesson of this course, and calls that the rank. The honest statement is that rank near a threshold is a judgement, not a computation.
Second, the complete solution tells you the set but does not choose a member of it. When there are infinitely many solutions, applications need one, and the usual choice is the shortest, which is a projection problem. The tools for that are in the next lesson.
The awkward case is now the common one: outside the column space, so no solution exists at all. Fifty measurements and two unknowns produce that situation nearly always, because fifty points do not lie on one line. Giving up is not the practice. The next lesson replaces the unreachable target by the closest reachable one, and finds that the whole method follows from a single right angle.