A matrix has two roles. It is a data array on which we perform arithmetic, and it represents a linear transformation after bases have been chosen. Understanding the second role explains why multiplication has its particular formula, why rank measures information, and why changing coordinates does not change the transformation itself.
1 Arithmetic that represents composition
For and , define . Then by rearranging finite sums. Matrix multiplication is associative and distributive but generally not commutative. The identity leaves vectors unchanged. The transpose exchanges row and column indices and satisfies .
For instance, and give but . Scaling before a shear differs from scaling after it.
Gaussian elimination uses reversible row operations on . Pivot columns determine pivot variables; the remaining variables are free. A row , , proves inconsistency. If no contradictory row appears, free variables may be chosen and pivot variables recovered by back substitution. The same operations on compute when the left block reduces to .
Example. For
the equations give , . Thus all solutions are . The null direction measures information the two observations cannot recover.
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.
2 Vector spaces basis and dimension
A real vector space has addition and scalar multiplication satisfying the usual distributive, associative, identity and inverse rules. Examples include , polynomial spaces , and matrix spaces. A subspace is a subset containing zero and closed under linear combinations. A basis is an independent spanning list; its length is the dimension. A point set such as is not a subspace because it omits zero.
In , the list is a basis. The list is another: a polynomial has coordinates in that list. Coordinates depend on the basis even though the polynomial does not.
A map is linear when . Its kernel is and its image is . Both are subspaces. Kernel zero is equivalent to injectivity: exactly when is in the kernel.
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.
3 Rank nullity and matrix representation
Let be finite-dimensional over and let be linear.
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.
For differentiation , the kernel consists of constant polynomials and has dimension 1; the image is all of and has dimension 2. Relative to bases and , its matrix is
Each column is the coordinate vector of the image of one domain basis element. This construction, not a memorized array, defines matrix representation.
If has new basis vectors as columns in old coordinates, then . For an operator with old matrix , its new matrix is . Multiplying in the wrong order confuses changing input coordinates with applying the transformation.
4 Graded practice
E1 Foundation. Solve , . Give a particular solution and a null-space basis.
E2 Representation. For defined by , find its matrix in . Is it invertible?
E3 Coordinates. Let and new basis , . Compute and check its first column directly.
E4 Proof. If and have the same finite dimension, prove a linear map is injective if and only if it is surjective.
5 Full solutions
S1. Subtract twice the first equation from the second: , so and . All solutions are . The null space is spanned by .
S2. Images are , , and . Thus . Back substitution solves uniquely for every output, so it is invertible. Its kernel is zero, also proving this by rank-nullity.
S3. , , giving . Directly, , the first column.
S4. If the shared dimension is , rank-nullity gives . Kernel zero is equivalent to image dimension , and a subspace of with dimension is all of . The finite and equal-dimension assumptions are essential.
Summary
Matrix multiplication represents composition. Bases convert abstract vectors and maps into coordinates. Kernels measure lost information, images measure possible outputs, and rank-nullity balances the two. Similar matrices represent the same operator in different bases.