Computed three-by-three LU decomposition Created 2026-10-14 Updated 2026-10-31
Here is an original example of Gaussian elimination that can be checked entirely with integers. Start withThe first pivot element is . The elimination multipliers are and . Apply the elementary row operations and to obtainNow the second pivot element is , and . The elementary row operation givesImportantly, comes from the current reduced matrix, not the original entry . To reconstruct from , its second row is twice the first row of plus the second; its third row is minus the first row of plus three times the second plus the third. These are exactly the coefficients in the lower triangular matrix .
Gaussian elimination turns a three-by-three matrix into an upper triangular matrix, while elimination multipliers are stored in a lower triangular matrix
. Details. The unpivoted calculation here illustrates the structure of LU decomposition; applying partial pivoting to this particular would choose a different first row and different factors. Both procedures can represent the same linear system when their permutation matrices are handled consistently.
Elementary column operation 2026-10-14
An elementary column operation interchanges two columns of a matrix, scales one by a nonzero scalar, or adds a multiple of another column. It is an elementary row operation on the transpose. Hence it has the same three effects on the determinant: changing sign, multiplying by the scale factor, or leaving the determinant unchanged.
Elementary matrix Created 2026-10-14 Updated 2026-10-25
An elementary matrix is obtained by applying one elementary row operation to the identity matrix. Multiplying by it on the left performs the same row operation on . Such a matrix is invertible: reverse a row swap, reverse a nonzero row scaling by its reciprocal, or reverse adding a multiple of another row by adding its negative. Right multiplication gives an elementary column operation. In particular these operations preserve matrix rank.
Elementary row operation 2026-10-14
An elementary row operation interchanges two rows of a matrix, multiplies one row by a nonzero scalar, or adds a scalar multiple of another row to it. These invertible operations are used in Gaussian elimination. For a square matrix, interchange changes the sign of its determinant, multiplication scales its determinant by the same scalar, and adding another row leaves its determinant unchanged, by multilinearity and alternation.
Elimination multiplier 2026-10-14
For , an elimination multiplier is the scalar used in the elementary row operation . This creates a zero below the pivot element. The remaining entries change by for . Storing these elimination multipliers gives the subdiagonal entries of in LU decomposition; later row interchanges must also reorder the already stored coefficients.
Gaussian elimination Created 2026-09-24 Updated 2026-10-25
Gaussian elimination applies elementary row operations to reduce a linear system to triangular form. Dense elimination uses arithmetic operations.
Gaussian elimination solves a linear system by removing one unknown from later equations at each step. Write the coefficients and right-hand side together as an augmented matrix . Apply the same elementary row operations to both parts until the coefficients form a row echelon form; for a square invertible matrix, this gives an upper triangular matrix system. Then back substitution recovers the unknowns from the last equation upward. The useful simplification is that each successive equation involves fewer unknowns, while the set of solutions stays the same.
Why do elementary row operations preserve solutions? Interchanging equations changes only their order. Multiplying an equation by a nonzero scalar can be undone by division. Replacing equation by itself plus times equation , with , can be undone by adding times the unchanged equation . Equivalently, an elementary matrix is an invertible matrix, so if and only if . Applying an operation to without also applying it to loses this equivalence.
At step , choose a nonzero pivot element after any row interchange. For every , form the elimination multiplier and perform the elementary row operation . Its coefficient in column becomes in exact arithmetic. Later operations combine rows that already have zeros in earlier columns, so those zeros survive. If an active column has no nonzero candidate, general row echelon form reduction skips it; a square invertible matrix always has a candidate at each step with suitable row interchanges. Partial pivoting also considers roundoff error when selecting the candidate.[ref]
2.6 Row pivoting. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; §2.6.1, Definition 2.6.1: select the largest absolute candidate; §2.6.3: permute the right-hand side too
For a dense matrix with one right-hand side, the classical algorithm uses arithmetic operations over the real numbers, counting each addition, subtraction, multiplication and division as one. At step , the coefficient update has entries, each costing one multiplication and one subtraction; the elimination multipliers, right-hand-side updates and back substitution contribute lower-order terms. Searching for partial pivoting adds comparisons, and storing the dense coefficients uses space. These assumptions exclude the different storage and work patterns of sparse Gaussian elimination; the exact loop counts appear in LU factorization and solve costs. Here denotes Big O notation.
Recording the same steps as an LU decomposition makes Reusing LU factors for multiple right-hand sides possible. This is useful whenever the coefficients stay fixed while the forcing vector changes: the expensive elimination is done once. The choice of pivot element matters even when the linear system is well conditioned, as Tiny-pivot roundoff in Gaussian elimination demonstrates.
Gaussian elimination with a row swap Created 2026-10-18 Updated 2026-10-20
Consider this original linear system and its augmented matrix:The first diagonal entry is zero, so it cannot serve as a pivot element. Interchange and to obtain a pivot element of one:This chooses a convenient nonzero entry for exact arithmetic; partial pivoting would instead interchange and , selecting the largest absolute value, two. For our chosen ordering, the first-column elimination multipliers are and . The elementary row operation givesThe next pivot element is two and the next elimination multiplier is . Applying gives the upper triangular matrix systemEvery operation also changed the right-hand side. Back substitution now givesChecking the original equations, rather than only the reduced ones, verifies the answer by matrix multiplication:Thus a zero first diagonal entry was a row-order obstruction, not a singular matrix. Indeed, the diagonal product of the final upper triangular matrix is ; the single row interchange makes , since the two row additions preserve the determinant.
A row interchange supplies the first pivot element; successive elementary row operations create zeros, then back substitution gives
. Details. Matrix rank Created 2026-09-24 Updated 2026-11-05
The matrix rank of an matrix over a field is the dimension of its column space, equivalently the dimension of its row space. It counts linearly independent column directions, with . Counting nonzero matrix entries gives a different quantity: an all-ones matrix can have arbitrarily many nonzero matrix entries and still have matrix rank one.[ref]
The Rank Theorem. Interactive Linear Algebra, §2.9, Definition: rank is column-space dimension; the row-space equality is proved below
Consider the following matrix over the real numbers, with columns written as vectors:The vectors are linearly independent: requires both and , so . The third column adds no new direction to their linear span, hence despite all nine matrix entries being nonzero. The second row likewise repeats twice the first row.
The column space is a plane through the origin:Every output has second coordinate twice its first coordinate. Conversely, any vector equals , so this condition describes the entire plane, not just part of it. For example, is attainable, whereas lies outside the plane.
Elementary row operations expose the same count algebraically. Apply and , interchange the last two rows, multiply the second row by , and subtract twice the second row from the first. The resulting reduced row echelon form isThere are two pivot columns, so the matrix rank is two. The corresponding original columns form a basis of the original column space. The pivot columns of itself span the different plane with third coordinate zero: row operations preserve column linear relations, but generally move the column space.[ref]
Row Reduction. Interactive Linear Algebra, §1.2.2, Echelon Forms; §1.2.3, definitions of pivot position and pivot column
Solving the homogeneous linear system gives and . Taking the free variable givesThe kernel is the input direction that trades one unit of each of the first two columns for one unit of the third. This trade leaves the output unchanged. The rank-nullity theorem expresses the general balance: for an matrix of matrix rank , the nullity is . The column space describes reachable outputs; the kernel describes invisible changes to inputs.[ref]
The Rank Theorem. Interactive Linear Algebra, §2.9, Rank Theorem: rank plus nullity equals the number of columns
For the attainable output , one solution is . Every solution lies in the affine solution space of a linear equationIndeed, and . Conversely, subtracting from any solution gives a vector in the kernel, so this describes every solution. For , the same row operations on the augmented matrix expose : the second requirement demands where twice the first requires .
Two pivot columns, one kernel direction, and the same row operations distinguishing attainable from impossible
. Details. In general, a linear system is solvable exactly when appending leaves the matrix rank unchanged:Appending a vector outside the column space adds an independent direction. When a solution exists, every solution is , because . Thus one count predicts both how many output directions are reachable and, through the rank-nullity theorem, how many independent input directions remain free.[ref]
Solution Sets. Interactive Linear Algebra, §2.4.2, Key Observation and its proof; §2.4.3, Solution Sets and Column Spans
Past exam of the mathematics course of the University of Cambridge 2008 ib Paper 1 9E Solution Created 2026-09-24 Updated 2026-10-14
The row rank of is the dimension of the span of its rows in ; its column rank is the dimension of the span of its columns in . Elementary row operations replace rows by invertible linear combinations, so preserve their span. They also preserve every column relation: if and only if for an invertible elementary matrix . Reduce to row echelon form , with nonzero rows. These rows are independent because their leading entries occur in distinct, successively later columns. The pivot columns are independent by their triangular pivot submatrix, while every column lies in the -dimensional coordinate space supported on the nonzero rows. Thus both ranks of , and hence both ranks of , equal . Row rank equals column rank.
Elementary column operations replace columns by invertible linear combinations and preserve their span. Equivalently, right multiplication by an invertible elementary matrix preserves row relations, since if and only if . Therefore either elementary row operations or elementary column operations preserve the matrix rank, and any finite sequence gives .
For the block matrices, put . The explicit invertible multiplicationsfollow by first subtracting times the lower block row from the upper one and then subtracting the first block column times from the second. Changing the sign of the upper block row gives . These operations preserve matrix rank, proving that the two specified block matrices have equal rank. Their off-diagonal form gives , since the two image components occupy independent coordinate blocks.
Choose independent columns of and independent columns of . Select the corresponding columns from the first block column of and from the second. In a linear relation among these selected columns, the upper coordinate block forces every coefficient of the first selection to vanish; the lower block then forces every coefficient of the second to vanish. Consequently . Combining this with the equality of block ranks proves the Frobenius rank inequality:
An elementary row operation is one of three operations: interchange two rows, multiply one row by a nonzero scalar, or add a scalar multiple of one row to a different row. Each operation is reversed by another operation of the same kind.
Performing such an operation on an matrix is equivalent to left multiplication by the elementary matrix obtained by applying that operation to the identity matrix. Each elementary matrix is invertible, with inverse corresponding to the reverse operation. Thus a sequence of operations givesFor square matrices, if were invertible, then would have inverse . Hence if is singular, must be singular as well. In fact the two are invertible together, because gives the converse.
An elementary row operation is one of three reversible changes: interchange two rows; multiply one row by a nonzero scalar; or add a scalar multiple of one row to a different row. Their inverses are, respectively, the same interchange, multiplication by the reciprocal, and addition of the negative scalar multiple.
Applied to an augmented matrix, these changes interchange linear equations, rescale an equation by a nonzero factor, or add a multiple of one equation to another. Every old solution satisfies the new equations. Applying the inverse elementary row operation gives the converse, so the solution set is unchanged at every step. Equivalently, all the operations together givewhere is an invertible matrix, a product of elementary matrices.
For , , whose row space is . For , elementary row operations give the reduced row echelon formIts row space is , whereas the image of a linear map is . These differ: belongs to the former but not the latter. Thus (A) is true exactly when . Rows are being identified with vectors in in this comparison.
Perform the elementary row operations and , then , , and finally , :Consequently the reduced row echelon form is . Applying the same operations to the augmented column givesThus every admits exactly one solution. This follows because the elementary row operations preserve the solution set of the augmented linear system, and the reduced coefficient matrix is the identity matrix.
For an matrix, the corresponding elementary matrices are , because the operation is implemented by left matrix multiplication. Apply the desired elementary row operation to the identity matrix . Writing for the matrix unit with its only nonzero entry, , in position gives:Indeed, these matrix products interchange rows , scale row , and add times row to row , respectively. The displayed inverses undo precisely those operations. Algebraically, when , so ; the other two inverse identities follow immediately from their row actions. Thus every elementary matrix is an invertible matrix.
- Interchange two distinct rows: .
- Multiply one row by a nonzero real number: , with .
- Add a scalar multiple of one row to a different row: , with .
Each operation changes whole rows, so it acts on every column by the same rule. Each can be undone by an elementary row operation.
Gaussian elimination uses elementary row operations to remove entries below successive pivot elements, reducing a linear system to one with an upper triangular matrix. Back substitution then solves that system. It also computes a reusable matrix factorization, so additional right-hand sides can be handled by forward substitution and back substitution without repeating the elimination.
For elimination without row exchanges, let . At step , provided the pivot element is nonzero, form the elimination multipliersand perform , applying the same operation to the right-hand side. More explicitly the resulting entries satisfy for , .
Let , where are the standard basis vectors. ThenThe matrix is a unit lower triangular matrix storing the elimination multipliers, while is an upper triangular matrix:Solving becomes followed by . If a required pivot element vanishes, an unpermuted LU decomposition can fail even for an invertible matrix. Row exchanges, typically selected by partial pivoting, instead produce with a permutation matrix ; then solve , .
Conversely, suppose . Use Gaussian elimination to reduce to row echelon form . Each elementary row operation multiplies the determinant by a nonzero factor, so . If this square matrix had fewer than pivots, its row echelon form would have a zero row and hence zero determinant, a contradiction. Therefore it has a pivot in every row and column, and further elementary row operations reduce it to .
Each elementary row operation is multiplication on the left by an invertible matrix, its inverse being the reverse operation. Thus implies , a product of invertible matrices. Hence
The three elementary row operations are:
- interchange two distinct rows, ;
- multiply a row by a nonzero scalar, with ;
- add a scalar multiple of another row, with .
The nonzero requirement in the second operation ensures that each elementary row operation is reversible.
Let denote the given tridiagonal matrix and put , including for the empty determinant. The starting values areFor , apply the following elementary row operations in the indicated order, always using the updated rows:The first three rows now beginwith the fourth column omitted if . When , also use . The resulting block upper triangular matrix has a upper triangular matrix with diagonal entries all one in its top left corner, and in its bottom right corner. All elementary row operations preserved the determinant except the single row interchange. ThereforeApplying this recurrence relation to the three starting values proves by mathematical induction thatEquivalently, the sequence is periodic with period six, with values starting at . A compact closed form is .
Apply the elementary row operation , which preserves the determinant. Expanding along the new first row givesA square matrix is an invertible matrix exactly when its determinant is nonzero. Thereforeare precisely the three values making a singular matrix. They also have direct explanations: at the second row is zero, at the first two rows coincide, and at the last two columns coincide.



