For a complex matrix , is the sum of the th powers of its eigenvalues, counted with algebraic multiplicity. This does not require diagonalizability: a similar upper triangular matrix has the eigenvalues on its diagonal, and taking powers raises those diagonal entries to their corresponding powers. Newton's identities therefore recover its characteristic polynomial from the first such traces.
For the Jordan block , and . Hence and , giving . The repeated eigenvalue is recovered even though this matrix is not diagonalizable.[ref]
Here is an original example of Gaussian elimination that can be checked entirely with integers. Start with
The first pivot element is . The elimination multipliers are and . Apply the elementary row operations and to obtain
Now the second pivot element is , and . The elementary row operation gives
Importantly, 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 .
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.
Forward substitution 2026-10-14
Forward substitution solves a linear system with a lower triangular matrix and nonzero diagonal, from the first row downward:
The first sum is empty, so . Each subsequent row uses only components already found. For a unit triangular matrix , omit the division because . The complementary procedure, back substitution, solves an upper triangular matrix system from the last row upward.[ref]
Gaussian elimination Created 2026-09-24 Updated 2026-10-18
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]
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 gives
The next pivot element is two and the next elimination multiplier is . Applying gives the upper triangular matrix system
Every operation also changed the right-hand side. Back substitution now gives
Checking 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.
Figure 1.
A row interchange supplies the first pivot element; successive elementary row operations create zeros, then back substitution gives
. Details.
Givens rotation Created 2026-09-24 Updated 2026-10-14
A Givens rotation eliminates one component of a vector by rotating just two coordinates, preserving its Euclidean norm. For example,
The length remains five: elimination moves the component into the retained coordinate rather than discarding it. Applied to a matrix, the same operation mixes two rows; QR decomposition by Givens rotations uses these local operations to build an upper triangular matrix.
Figure 1.
A Givens rotation takes clockwise to while preserving the Euclidean norm
. Details.
For indices , the matrix is the identity matrix except for its block on coordinates :
This article uses left matrix multiplication on column vectors. If and , the block is a rotation matrix through angle : the minus sign belongs in the lower left. Its transpose reverses the rotation. Direct multiplication gives and determinant one, so it is an orthogonal matrix; consequently . Only two coordinates change, but this Euclidean norm identity holds for the entire vector.
Apply the preceding Householder reflection to the columns of
The first column becomes and the second becomes :
Thus an orthogonal matrix multiplying an upper triangular matrix reconstructs . The zero below the diagonal came from a geometric operation that preserves Euclidean norms and inner products.
Figure 1.
A single Householder reflection makes a two-column matrix upper triangular
. Both columns are reflected by the same orthogonal transformation. The first lands on the first coordinate axis; the second retains a nonzero second component. The intermediate triangular factor has a negative first diagonal entry. Details.
Our positive-diagonal convention for QR decomposition is obtained by a sign adjustment. With , put
Then and . The intermediate sign chooses an orientation for a basis vector; the adjustment makes the diagonal positive.
For a larger matrix, the next Householder reflection acts only on the lower rows of the remaining columns, retaining the zeros already created. Store its defining vector and apply instead of forming a dense reflection matrix. This links a simple mirror operation to efficient QR decomposition, including least-squares solutions.
LU decomposition Created 2026-09-29 Updated 2026-10-14
An LU decomposition writes a square matrix as , with a lower triangular matrix and an upper triangular matrix. We use a unit triangular matrix , meaning . The factors record Gaussian elimination: contains the reduced equations, while stores the elimination multipliers needed to reconstruct the original equations. This makes Reusing LU factors for multiple right-hand sides inexpensive.[ref]
For an invertible matrix, unpivoted LU decomposition requires nonzero pivot elements at every elimination step; invertibility alone does not guarantee this. In general use Pivoted LU decomposition, with the explicit convention and a permutation matrix . Once the factors exist, solving a linear system needs forward substitution followed by back substitution, rather than forming a matrix inverse.
Matrix decomposition 2026-10-14
A matrix decomposition expresses a matrix as a matrix product of factors with simpler structure. An LU decomposition uses triangular factors, a QR decomposition uses an orthogonal matrix and a triangular factor, and a singular value decomposition separates input directions, stretching factors and output directions. The factorization is an identity; the chosen structure determines what it helps compute.
For an original two-by-two example,
The outer factors are a lower triangular matrix and an upper triangular matrix, each with unit diagonal as in a unit triangular matrix; the middle factor is a diagonal matrix. Their matrix product is , and the final diagonal entry is the Schur complement of the first entry . This is the scalar version of the factorization under block elimination.
To solve , solve with the three factors in their displayed order from left to right: first the lower triangular factor, then the diagonal factor, then the upper triangular factor. The intermediate vectors are and , giving the concise answer . A new right-hand side uses the same factors. This is why Reusing LU factors for multiple right-hand sides is useful: factorization records work that otherwise would be repeated, while forward substitution and back substitution apply it cheaply.[ref]
Different decompositions reveal different features. A Cholesky decomposition uses positive definiteness of a symmetric matrix, while a singular value decomposition also applies to rectangular matrices and exposes matrix rank. The existence and numerical behaviour of the factors depend on their own hypotheses; for example, an unpivoted LU decomposition can fail when a chosen pivot element is zero even though the matrix is an invertible matrix.
Matrix trace Created 2026-09-24 Updated 2026-10-14
For an -by- square matrix over a field, its matrix trace is the sum of its diagonal entries:
For example, has trace . Adding corresponding diagonal entries immediately proves linearity:
Thus matrix trace is a linear functional on the vector space of -by- matrices.[ref]
The surprising point is that the sum is intrinsic to a linear operator, even though individual diagonal entries depend on the basis. The cyclic property of the trace gives, for any invertible matrix ,
Hence matrix similarity preserves trace. For the example above, choose the change-of-basis matrix . Then
The diagonal entries have changed but their sum has not. This makes trace useful for extracting a feature of the underlying linear operator without finding a preferred basis.
Over the complex numbers, or over the real numbers after allowing complex eigenvalues, the trace equals their sum with algebraic multiplicity:
No diagonalizable matrix hypothesis is needed.[ref] To see why, use triangularization over an algebraically closed field: an upper triangular matrix similar to has the eigenvalues on its diagonal, counted with algebraic multiplicity, because its characteristic polynomial is . Similarity preserves trace, so summing that diagonal proves the formula.
For instance,
There is only one independent eigenvector, since , so is not a diagonalizable matrix. Nevertheless its repeated eigenvalue contributes twice. For our earlier , the characteristic polynomial is , its eigenvalues are and , and their sum is . An inexpensive diagonal sum therefore gives spectral information before solving the characteristic polynomial.
The trace of a real matrix does not give that linear map's volume factor: that factor is the absolute value of its determinant. For example, has trace and area factor , but has trace and volume factor . Their occasional numerical agreement in two dimensions is a coincidence. The connection between trace and local volume change gives a geometric interpretation near the identity matrix, and describes the volume rate of a flow map generated by a linear system of differential equations.
For two upper triangular matrices and ,
Indeed a potentially nonzero factor requires , while a potentially nonzero requires . These requirements cannot both hold when . Thus their matrix product is upper triangular.
Direct matrix multiplication for the given gives
Adding yields , so . Hence
Every nonnegative matrix power is in : reduce powers of degree at least three using . More formally, repeated reduction shows that products of any two polynomials of degree at most two in again lie in this span. Since also lies in it, positive powers of prove the same assertion for all negative integers. This is an instance of the integer powers for an annihilating polynomial with roots one and minus one, because .
To find the required entries for every integer, use the block upper-triangular structure. The top-left entry of is for positive and negative powers. Its lower-right block is
The identity holds for all integers: multiplication adds the coefficients of , and proves the negative cases. Therefore
Write and . Comparing those three entries gives
Subtracting the first two equations finds ; the third then finds , and the first finds . The unique solution is
For clarity, substituting also gives the full matrix power
Each plane rotation satisfies . Hence is an orthogonal matrix and is an upper triangular matrix. Multiplication by gives the QR decomposition
The zero-pair cases already handled make this construction valid for every real matrix, including rank-deficient matrices. Orthogonality follows from the product identity, not from any invertibility assumption on .
Let the repeated eigenvalue be , and choose an eigenvector . Complete it to a basis of . In this basis the matrix is an upper triangular matrix, with first column , say . Its characteristic polynomial is . By part (a)(ii), this must equal , so .
If , the matrix is already . If , rescale the first basis vector by and apply part (a)(iii); the upper-right entry becomes one. Thus
The second possibility is a size-two Jordan block. It has only one independent eigenvector, whereas has a two-dimensional eigenspace, so the two types cannot be related by matrix similarity. This repeated-eigenvalue classification in dimension two proves the required result without assuming the general Jordan normal form theorem.
For a Lie algebra , write for the linear span of brackets with one argument in each indicated subspace. The three definitions are
These are respectively an Abelian Lie algebra, a solvable Lie algebra and a nilpotent Lie algebra. The second and third sequences are the derived series of a Lie algebra and the lower central series of a Lie algebra.
An Abelian Lie algebra has , and a nilpotent Lie algebra is a solvable Lie algebra: induction gives . Thus all the implications are generated by
None of the reverse implications holds. The Heisenberg Lie algebra with basis and , all other basic brackets zero, is nonabelian but has , . The two-dimensional affine Lie algebra of the line with has and , but for every . It is solvable and neither nilpotent nor abelian. These two examples answer all six ordered-pair comparisons.
The Lie theorem says that a finite-dimensional Lie algebra representation of a finite-dimensional solvable Lie algebra over an algebraically closed field of characteristic zero has a common eigenvector whenever its representation space is nonzero. Equivalently it admits an invariant complete flag, or simultaneous upper triangularization. Here the field may be taken to be ; these hypotheses are essential.
To prove the common-eigenvector assertion, induct on . The zero algebra is immediate. Since is nonzero and solvable, its derived algebra is proper. Choose a codimension-one Lie algebra ideal containing it, and write . The Lie algebra is solvable, so induction supplies and a linear functional with .
Consider the finite-dimensional cyclic subspace . Until the first linear dependence, these powers form a basis. The identity
and show by induction, simultaneously for all , that is -invariant and that is upper triangular on it with every diagonal entry . It is also -invariant by construction. Hence
The trace of a commutator is zero, and characteristic zero gives .
The simultaneous eigenspace is nonzero and -invariant, since
Over an algebraically closed field, has an eigenvector, which is therefore a common eigenvector for all of . This finishes induction. Apply the same assertion to the quotient representation by its invariant line, and then to successive quotients. A basis adapted to the resulting complete flag gives the stated simultaneous triangularization of a Lie algebra representation, completing the proof of the Lie theorem.
A nilpotent Lie algebra is a solvable Lie algebra, so the inclusion satisfies the Lie theorem and is upper triangular in a suitable basis, for finite-dimensional complex .
This is insufficient to prove the Engel theorem. Its matrix version starts with a Lie subalgebra of nilpotent endomorphisms and concludes that they are simultaneously strictly upper triangular; its abstract version concludes nilpotence from nilpotence of every Adjoint representation endomorphism. Merely upper triangular matrices can have nonzero diagonal entries: the one-dimensional algebra is an Abelian Lie algebra and a nilpotent Lie algebra, but acts by a nonnilpotent identity matrix. This is nilpotent Lie algebras need not act nilpotently. Moreover, in the abstract Engel theorem nilpotence of the algebra is a conclusion, so assuming it first to invoke the Lie theorem would be circular. Abstract nilpotence and nilpotence of each representing matrix are different conditions.
A subgroup of a group is a normal subgroup when for every , equivalently . The quotient group has the left cosets as elements, with , identity and inverse . Normality makes this multiplication independent of representatives.
The first isomorphism theorem for groups says that for a group homomorphism , its kernel of a group homomorphism is normal and
The image is taken with the induced group operation; surjectivity onto all of is not required.
For the given upper triangular matrices, take diagonal entries:
The target is a direct product of groups, with multiplication of nonzero real numbers in each coordinate. Indeed the product of two such matrices has diagonal , proving the group homomorphism property. Any pair of nonzero diagonal entries is attained by a diagonal matrix, so is surjective. Its kernel of a group homomorphism consists precisely of the matrices with , namely . Hence
with coordinatewise multiplication, not addition on .
Gaussian elimination without row exchanges gives the LU decomposition
Because has unit diagonal and is upper triangular,
Solving the two triangular systems gives
and
QR decomposition Created 2026-09-24 Updated 2026-10-14
A reduced QR decomposition of an matrix over the real numbers with full column rank, , writes , where is with orthonormal columns and is a upper triangular matrix with positive diagonal. Applying the Gram-Schmidt process to the columns of constructs and records the coefficients
This last column identity is exactly the matrix multiplication . The upper triangular matrix records that the th input uses only the first new directions, while its positive diagonal records the norms of the nonzero orthogonal projection residuals. Since , one also has ; denotes the transpose and the identity matrix. Over the complex numbers, use the conjugate transpose in these identities.
For the three-dimensional Gram-Schmidt process example, the exact matrices are
For example, the last column reconstructs as
The diagonal entries are approximately . Each is a norm of the new direction before it was scaled to length one.
For a linear least-squares problem, the orthogonal projection of onto the column space of is . Hence the minimizing coefficients solve the linear system by back substitution. Let consist of the first two columns of the example; its reduced factors are and the leading block of . For , the linear system is
Thus , agreeing with the orthogonal projection computed above, and the minimum Euclidean norm of is . The QR decomposition separates building an orthonormal basis from recovering coefficients in the original basis.[ref]
QR decomposition by Givens rotations Created 2026-09-24 Updated 2026-10-14
Successive Givens rotations eliminate entries below the diagonal of a matrix. For an matrix with , process columns ; within column , rotate rows for each whose entry needs elimination. Apply each Givens row-pair update to columns . Both rows are zero in earlier columns, so these operations preserve earlier eliminations. No assumption of full column rank is needed to perform the eliminations.
For a concrete example, take
First use , then :
The entry in position was already zero, so its elimination was skipped. The second Givens rotation combines the remaining pair in column two. This yields the full QR decomposition
The first two columns of and first two rows of give the reduced QR decomposition. Direct multiplication verifies both and . For these displayed factors evaluated in binary64 floating-point arithmetic, the Frobenius norms and are both below ; these measure reconstruction and loss of orthogonality separately.
Figure 1.
Two local Givens row-pair updates turn a matrix into the rectangular of a QR decomposition
. Details.
More generally, if the chronological rotations are , then
Each factor is an orthogonal matrix, so is too. For a rectangular matrix, has zeros below its diagonal; its leading block is an upper triangular matrix. With full column rank, retaining the first columns of gives orthonormal columns. To impose a positive diagonal when necessary, flip matching columns of and rows of , preserving their product.
For a linear least-squares problem, apply the same chronological Givens rotations to the right-hand side , obtaining , without explicitly constructing . Since the Euclidean norm is preserved, solve the leading upper triangular matrix system by back substitution when has full column rank; the remaining entries of give the minimum residual norm. In the example, gives , , and minimum residual Euclidean norm .
The locality is useful for a sparse matrix or an existing QR decomposition needing an extra row: only two rows change at each step, and the new row can be eliminated against the stored upper triangular matrix. For an factor, this extra-row procedure takes rotations and arithmetic operations. Locality does not guarantee preservation of sparsity: mixing rows can create nonzeros wherever either row had one. For a fully populated input, the straightforward elimination uses rotations, each touching columns, giving work. Storage layout, zero patterns and implementation affect speed; this count alone establishes no universal advantage over other QR decomposition algorithms.
The Euclidean norm preservation explains the appeal for numerical stability: exact rotations do not amplify a perturbation's length. Rounded coefficients and Givens row-pair updates still introduce roundoff error. Small reconstruction and orthogonality residuals check the computed factors, while the condition number of the original problem still controls how accurately a linear least-squares problem determines its solution.
Strictly upper triangular matrix Created 2026-10-06 Updated 2026-10-07
A square matrix is strictly upper triangular if every entry on or below its diagonal is zero. A product of such -by- matrices vanishes, so they form a nilpotent Lie algebra under the commutator. Multiplication by an upper triangular matrix preserves strict upper triangularity and zero trace.