Proof of the finite real matrix product laws
Let be positive integers, let , , and . All the following arguments use the row-by-column definition and finite real sums. For any output position ,
The middle equality only reorders two finite sums and uses real distributivity. Both products are , so equality at every position proves associativity. No factor has changed its order.
For , the same definition gives
For , it gives
Thus both distributive laws hold with the displayed matching sizes. For every real scalar ,
proving by entrywise equality. In particular, for and real ,
This proves the matrix-vector linearity used when comparing solutions of the same linear system. All identities concern compatible finite real matrices; they do not assert commutativity or cancellation of arbitrary matrix factors.
Finite elimination terminates and preserves the solution set
Let , , with positive finite integers . The permitted row operations are an exchange of two distinct rows, multiplication of a row by a nonzero scalar, and addition of a scalar multiple of one row to a different row. Their inverses are respectively the same exchange, multiplication by the reciprocal, and subtraction of that multiple. Applying an operation to the entire augmented array therefore preserves exactly the solutions of : the new equations are consequences of the old, and its inverse gives the reverse implication. Each operation is also multiplication on the left by the result of applying it to the identity matrix, an invertible elementary matrix.
Scan the coefficient columns from left to right, maintaining the next unused row. If the current column has a nonzero entry in an unused row, exchange that row into the next position, divide by its nonzero pivot, and subtract multiples of it from every other row to clear that column. Advance the unused-row index. If every unused entry in the column is zero, skip the column. Previously chosen pivot columns remain unit columns: the current unused rows have zeros in them, so the new pivot row and every subsequent subtraction preserve those zeros and earlier pivots. There are only column scans and at most pivots, each with finitely many row operations. Thus the algorithm terminates. At its end, the nonzero coefficient rows have increasing pivot columns and zeros below and above each pivot; any remaining coefficient row is zero. This proves the reduced echelon form used below, without assuming it will eventually appear.
Classification and the homogeneous freedom
Write for the number of pivots in the coefficient part. A zero coefficient row with a nonzero transformed right side is the impossible equation , so the system has no solution. Otherwise assign arbitrary real values to all nonpivot variables. In each pivot row, its pivot variable equals the transformed right side minus the displayed linear combination of these free variables; no other pivot variable occurs. These formulas both construct a solution and recover every solution. If the solution is unique. If , changing a free variable changes the vector, giving infinitely many solutions.
For the free variables can all be zero, giving the zero solution. If , set one free variable to one and the others to zero, and use the pivot formulas. This constructs a nonzero homogeneous solution. If , the formulas force every homogeneous variable to zero. For a consistent system, fixing one solution , subtraction proves that every solution has the form with , and substitution proves the converse.
For square , if every column has a pivot, the coefficient form is . The product of the finitely many elementary matrices satisfies . Since is invertible, and therefore also : is a two-sided inverse. If a pivot is missing, the nonzero homogeneous solution constructed above rules out any inverse. This also justifies applying the same row operations to to obtain in the invertible case.
A vector space is a set with addition and scalar multiplication satisfying the usual abelian-group and distributive axioms over a field . Columns are one model. Polynomials of degree at most , denoted , and linear maps between spaces are others. The zero polynomial is included in although its degree is not ordinarily defined.
A subspace contains zero and is closed under sums and scalar multiples. A list spans if every vector is a linear combination of its entries; it is independent if only the zero coefficients give zero. A basis is both. A finite spanning list can be reduced to a basis by deleting dependent entries; an independent list can be extended to a basis by adding vectors outside its span until the given finite spanning list is spanned.
Exchange lemma. An independent list of vectors in the span of vectors has . To see this, express the first independent vector in the spanning list, use a nonzero coefficient to replace one spanning vector by it, and repeat. At each stage independence ensures the next independent vector has a nonzero coefficient on an as-yet unreplaced spanning vector. There must be at least such slots. Comparing two bases in both directions proves that their lengths agree; this common length is .
Consequently, in dimension , any independent vectors form a basis, as do any spanning vectors. Counting a list is useful only after its independence or spanning has been justified.
Finite basis existence and extension, without a counting assumption
Let be a real vector space supplied with a finite spanning list . First prove that every independent list has length at most . After insertions, maintain a spanning list consisting of and surviving old vectors. Expand in this list. Some coefficient on a surviving old vector is nonzero; otherwise would be in the span of the earlier , contradicting independence. Solve for that old vector and replace it by . The new list spans the same space and keeps every earlier insertion. If , after steps the first independent vectors already span , contradicting independence of . This proves the bound, including .
Every subspace has a finite basis. Start with the empty independent list. If its current span is not , choose one vector of outside that span. A relation with nonzero coefficient on the new vector would express it in the old span, so the enlarged list remains independent. The proved bound permits at most additions; therefore the process stops with an independent spanning list for . If , it stops immediately with the empty basis. Starting instead with any given independent list in proves that list extends to a basis of . Only a bounded finite selection is used. Finally, if two bases have sizes , use each as the finite spanning list in the bound to obtain and . Thus basis size, called dimension, is well-defined. This supplies the existence, extension and dimension facts used in rank–nullity.
A map is linear if . Its kernel and image are subspaces. Choose a basis of and extend to a basis with . Then form a basis of : spanning follows by expanding any input; a dependence among these images places the corresponding input combination in the kernel, and independence of the extended basis makes all coefficients zero. Thus
This is rank–nullity. In equal finite dimensions, injectivity and surjectivity are equivalent, but the equivalence can fail in infinite-dimensional spaces.
If and solve the same system , their difference satisfies . Thus a question about all solutions leads to a homogeneous system: which changes to one solution leave the right-hand side unchanged? The null space collects precisely those changes.
Why homogeneous systems are special
Definition
Homogeneous system
A homogeneous linear system is a linear system of the form
Its trivial solution is the zero vector .
Since , a homogeneous system is always consistent. The remaining question is whether it has any nonzero solutions.
The null space collects all homogeneous solutions
Definition
Null space
For a real matrix , the null space of is
So is exactly the solution set of the homogeneous system .
The input vectors lie in , while their outputs lie in . Membership in asks whether the output is the zero vector.
Worked example
Membership in the null space is a direct test
Let
Then
So but . This is the practical meaning of the definition: to test membership in , compute and check whether the result is exactly the zero vector.
Row reduction tells you the shape of the null space
To find , you solve by reducing the augmented system . The pivots tell you which variables are determined; the free variables tell you how many directions of freedom remain.
Worked example
Solve a homogeneous system and describe the null space
Let
To solve , row-reduce:
So the equation is
Take and as free variables. Then
Therefore
So
Here means the set of all real linear combinations of the displayed vectors. The parameters and range independently, so the formula describes every homogeneous solution. The set notation is developed in 4.2 Set language and solution sets.
Why free variables force infinitely many homogeneous solutions
Theorem
A free variable creates infinitely many solutions
If the homogeneous system has at least one free variable, then it has infinitely many solutions.
A free variable may be assigned any real value. Since that variable is itself a coordinate of the solution vector, changing its value changes the vector. A parameter chosen as an actual free coordinate cannot disappear from the full solution vector.
If a homogeneous system has more variables than pivot equations, at least one free variable remains. The same argument therefore gives infinitely many solutions.
Worked example
One free variable already produces a whole line of solutions
Suppose row reduction shows that
If , then , so every solution has the form
Different values of give different vectors, so the homogeneous system has infinitely many solutions, not just more than one.
Worked example
A trivial null space can also occur
Let
Then is simply
So the only solution is the zero vector, and therefore
This is the opposite extreme from the earlier example with free variables.
The null space is a subspace
Adding two homogeneous solutions or multiplying one by a scalar produces another homogeneous solution. Together with the zero solution, these are the closure properties that define a subspace of .
Theorem
The null space is closed under linear combinations
For any matrix , the null space is a subspace. In particular:
- ,
- if , then ,
- if and is a scalar, then .
Proof
Why the null space is a subspace
We already know because .
Now take . Then and . By linearity,
so .
Likewise, if and is a scalar, then
so .
The general definition and closure test are developed in 6.2 Subspaces. Here the equations above establish the properties needed for linear combinations of null-space vectors.
How to read a basis for the null space from RREF
A basis is a linearly independent spanning list. For , the free-coordinate description gives such a list directly: it generates every solution, and no nonzero choice of its coefficients gives the zero vector. The general notions of basis and dimension are developed in 6.5 Basis and dimension.
To construct this list:
- row-reduce ,
- identify pivot and free variables,
- set one free variable to and the others to ,
- solve for the pivot variables,
- repeat once for each free variable.
These vectors really form a basis, not merely a candidate. Suppose there are free coordinates, and let be the solution obtained by setting the th free coordinate to one and all other free coordinates to zero. For any , let be its free coordinates. Closure shows that is a homogeneous solution. It has exactly the same free coordinates as , and the reduced pivot equations determine all remaining coordinates uniquely. Thus it equals , proving spanning.
For independence, suppose . Its th free coordinate is precisely , because only has a one there. Hence every . This proves independence without an extra reduction. The vectors therefore form a basis and their number is the nullity. If there are no free variables, the null space is and its basis is the empty list, not the list containing the zero vector. This boundary agrees with nullity zero.
Nullity counts the free coordinates
The basis just constructed has one vector for each free coordinate. Its size is the dimension of , called the nullity of . If an RREF of an matrix has pivots, it has free variables, so
The pivot count is called the rank. Its independence from the reduction path is justified in 5.2 RREF uniqueness and rank. In that notation, the count becomes
Homogeneous solutions control nonhomogeneous ones
Once one solution of is known, the homogeneous solutions give all changes that preserve the right-hand side.
Theorem
Every solution is a particular solution plus a null-space vector
Suppose is one particular solution of .
Then a vector solves if and only if
for some .
Writing for the solution set, the theorem states .
Proof
Why the full solution set has the form
First suppose is any solution of . Then
Subtracting gives
So , which means for some .
Conversely, if , then . Hence
So every vector of the form is also a solution.
Concept lensGeometric
A fixed displacement of the null space
For a fixed particular solution , the notation means the set of all vectors with . Addition by moves each point of the null space by the same displacement. It gives a one-to-one correspondence between homogeneous and nonhomogeneous solutions: its inverse subtracts . The original proof establishes both that every displaced point works and that every solution is reached.
The chosen particular solution is not unique in general, but the displaced set is independent of that choice. If is another solution, then . For every , , and closure gives . This proves ; replacing by proves the reverse inclusion. Different starting points along the solution set therefore produce the same family.
Consistency is essential: if there is no particular solution, this description cannot be started. For , a consistent solution set contains no zero vector because . It is a translate of a subspace, called an affine subspace, but is not itself a vector subspace. Adding two of its solutions gives right-hand side , rather than . The homogeneous case is exactly the case in which the solution set is the null space itself.
Worked example
Use one particular solution and two null-space directions
Suppose a system has one known solution
and suppose the homogeneous system has solution directions
If these two directions span , then every solution of has the form
Written out, this is
Here , whereas . The vector supplies a solution with the required output; the directions and allow the input to vary without changing that output. Their spanning condition is what guarantees that the formula reaches every solution.
A one-dimensional null space gives an affine line
Worked example
Describe all solutions as a translate of the null space
Suppose the system has one particular solution
and suppose
Then every solution has the form
The null space gives the direction of freedom; the particular solution tells you where that family of solutions sits.
Scaling a solution usually changes its right-hand side. For a different system, the effect can be checked directly: if , then
So is a solution of . This is not because solution sets can be rescaled freely in every situation. It works here because the coefficient matrix and the right-hand side have both been scaled, and the calculation checks the claim directly.
Homogeneous solutions and column dependence
The null-space equation also explains when the columns of a matrix are dependent.
Let the columns of be . Then
is the same as
So a nontrivial solution of the homogeneous system is exactly a nontrivial linear relation among the columns.
Worked example
A nontrivial null-space vector gives a dependence relation
Suppose
Then
means
This is a nontrivial dependence relation among the columns of .
What null space says about uniqueness
The structure theorem gives an immediate test.
- If , then a consistent system has exactly one solution.
- If contains a nonzero vector, then every consistent system has infinitely many solutions, because you can add scalar multiples of that vector to a particular solution.
The consistency hypothesis is necessary: a zero null space guarantees at most one solution for each , but does not by itself guarantee that a solution exists.
Multiplying equations can discard information
Row operations preserve a homogeneous solution set because they are reversible. A general matrix multiplier need not be reversible. The precise result keeps the direction of set inclusion visible.
Theorem
Null-space transport under left multiplication
Let be a real matrix and a real matrix. Then
If is square and invertible, then .
Proof
Where invertibility is needed
Take any . Then , so . Thus , proving the inclusion for arbitrary compatible . Notice that both null spaces consist of vectors in , even when the matrices have different numbers of rows.
For the reverse inclusion, suppose is square and invertible, so , and take . Then . Multiplying by gives , so . Only this second direction needs an inverse. Together the two inclusions prove equality.
Every row of is a linear combination of rows of . Consequently, the new equations are consequences of the old ones: every old solution satisfies them. If the combinations lose information, new solutions may appear. This is why arbitrary row combinations cannot replace elementary row operations without checking what has been preserved.
Worked example
A multiplier that loses a constraint
Take
Then . The original equation imposes both and , whereas the new equation only imposes . Therefore
The vector belongs to the second set and not the first, so the inclusion is strict. This verifies the lost condition directly rather than inferring it merely from the number of equations. Invertibility is a sufficient condition for equality, but not a necessary condition for each particular : if is zero, both null spaces are all of , even for a noninvertible multiplier. The theorem must not be silently reversed.
Stacking equations means intersecting null spaces
There is another way to combine systems: keep all their equations together. Unlike taking selected row combinations, stacking retains each condition.
Theorem
The null space of a stacked matrix
Let be and be , both real. For
we have . Here intersection means membership in both sets simultaneously. The row counts may differ; the column counts must agree.
Proof
Prove the stacked identity in both directions
First take . By the block multiplication rule,
Equality of the top and bottom entries gives and . Thus belongs to each null space and hence to their intersection.
Conversely, take . Membership supplies both equations and . Stacking their outputs gives
so . Every membership step has now been checked in both directions, which proves equality of the sets.
For example, stacking and imposes both and , leaving exactly the vectors . Each individual null space is larger, but their intersection keeps only their common vectors. Repeated stacking similarly represents the intersection of finitely many homogeneous solution sets. The next note uses this identity to distinguish retaining every equation from retaining only a linear combination of them.
Common mistakes
Common mistake
The zero vector always belongs to the null space
Students sometimes think a homogeneous system can have no solution. That is impossible, because always satisfies .
Common mistake
A particular solution is not the whole solution set
Finding one vector with is only the start. You still need to add the whole null space to describe every solution.
Common mistake
Do not confuse a particular solution with a direction
If and both solve , then solves . The vector is a direction inside the null space, not a new right-hand side.
Quick checks
Checkpoint
Why does always have at least one solution?
Answer in one sentence.
Solution · Answer
Because the zero vector always satisfies .
Checkpoint
If and is consistent, how many solutions does it have?
Use the theorem from this note.
Solution · Answer
Exactly one, because there is no nonzero null-space vector to add to a particular solution.
Checkpoint
If has a free variable, can the solution set contain only two vectors?
Answer from the parameter form, not from a guess.
Solution · Answer
No. A free variable can vary through infinitely many scalar values, so it produces infinitely many solution vectors.
Checkpoint
Suppose and both solve . What homogeneous system does solve?
Use one line of matrix algebra.
Solution · Answer
It solves , because
Exercise
Checkpoint
Suppose solves and . Why do and both solve ?
Write one line using linearity.
Solution · Guided solution
Because and , we have
and similarly
So adding any null-space vector to a particular solution keeps you inside the solution set.
Related notes
This note builds on 2.3 Gaussian elimination and RREF and 2.4 Solution-set types. It prepares the way for 5.1 Invertible matrices and connects naturally with 6.2 Subspaces.