Triangular matrix

Binary lower unitriangular Toeplitz matrices, multiplied using F2 operations. They form the Cayley table of Z4 and correspond to powers of the 4-bit Gray code permutation.

In the mathematical discipline of linear algebra, a triangular matrix is a special kind of square matrix. A square matrix is called lower triangular if all the entries above the main diagonal are zero. Similarly, a square matrix is called upper triangular if all the entries below the main diagonal are zero. A triangular matrix is one that is either lower triangular or upper triangular. A matrix that is both upper and lower triangular is called a diagonal matrix.

Because matrix equations with triangular matrices are easier to solve, they are very important in numerical analysis. By the LU decomposition algorithm, an invertible matrix may be written as the product of a lower triangular matrix L and an upper triangular matrix U if and only if all its leading principal minors are non-zero.


A matrix of the form


is called a lower triangular matrix or left triangular matrix, and analogously a matrix of the form


is called an upper triangular matrix or right triangular matrix. A lower or left triangular matrix is commonly denoted with the variable L, and an upper or right triangular matrix is commonly denoted with the variable U or R.

A matrix that is both upper and lower triangular is diagonal. Matrices that are similar to triangular matrices are called triangularisable.

Upper triangularity is preserved by many operations:

  • The sum of two upper triangular matrices is upper triangular.
  • The product of two upper triangular matrices is upper triangular.
  • The inverse of an upper triangular matrix, where extant, is upper triangular.
  • The product of an upper triangular matrix and a scalar is upper triangular.

Together these facts mean that the upper triangular matrices form a subalgebra of the associative algebra of square matrices for a given size. Additionally, this also shows that the upper triangular matrices can be viewed as a Lie subalgebra of the Lie algebra of square matrices of a fixed size, where the Lie bracket [a, b] given by the commutator ab − ba. The Lie algebra of all upper triangular matrices is a solvable Lie algebra. It is often referred to as a Borel subalgebra of the Lie algebra of all square matrices.

All these results hold if upper triangular is replaced by lower triangular throughout; in particular the lower triangular matrices also form a Lie algebra. However, operations mixing upper and lower triangular matrices do not in general produce triangular matrices. For instance, the sum of an upper and a lower triangular matrix can be any matrix; the product of a lower triangular with an upper triangular matrix is not necessarily triangular either.


This matrix


is upper triangular and this matrix


is lower triangular.

Special formsEdit

Unitriangular matrixEdit

If the entries on the main diagonal of a (upper or lower) triangular matrix are all 1, the matrix is called (upper or lower) unitriangular. All unitriangular matrices are unipotent. Other names used for these matrices are unit (upper or lower) triangular (of which "unitriangular" might be a contraction), or very rarely normed (upper or lower) triangular. However, a unit triangular matrix is not the same as the unit matrix, and a normed triangular matrix has nothing to do with the notion of matrix norm. The identity matrix is the only matrix which is both upper and lower unitriangular.

The set of unitriangular matrices forms a Lie group.

Strictly triangular matrixEdit

If all of the entries on the main diagonal of a (upper or lower) triangular matrix are 0, the matrix is called strictly (upper or lower) triangular. All strictly triangular matrices are nilpotent, and the set of strictly upper (or lower) triangular matrices forms a nilpotent Lie algebra, denoted   This algebra is the derived Lie algebra of  , the Lie algebra of all upper triangular matrices; in symbols,   In addition,   is the Lie algebra of the Lie group of unitriangular matrices.

In fact, by Engel's theorem, any finite-dimensional nilpotent Lie algebra is conjugate to a subalgebra of the strictly upper triangular matrices, that is to say, a finite-dimensional nilpotent Lie algebra is simultaneously strictly upper triangularizable.

Atomic triangular matrixEdit

An atomic (upper or lower) triangular matrix is a special form of unitriangular matrix, where all of the off-diagonal elements are zero, except for the entries in a single column. Such a matrix is also called a Frobenius matrix, a Gauss matrix, or a Gauss transformation matrix. So an atomic lower triangular matrix is of the form


The inverse of an atomic triangular matrix is again atomic triangular. Indeed, we have


i.e., the off-diagonal entries are replaced in the inverse matrix by their additive inverses.


The matrix


is atomic lower triangular. Its inverse is


Special propertiesEdit

A matrix which is simultaneously triangular and normal is also diagonal. This can be seen by looking at the diagonal entries of A*A and AA*, where A is a normal, triangular matrix.

The transpose of an upper triangular matrix is a lower triangular matrix and vice versa.

The determinant and permanent of a triangular matrix equal the product of the diagonal entries. Since for any triangular matrix A the matrix  , whose determinant is the characteristic polynomial of A, is also triangular, the diagonal entries of A in fact give the multiset of eigenvalues of A (an eigenvalue with multiplicity m occurs exactly m times as diagonal entry).[1]


A matrix that is similar to a triangular matrix is referred to as triangularizable. Abstractly, this is equivalent to stabilizing a flag: upper triangular matrices are precisely those that preserve the standard flag, which is given by the standard ordered basis   and the resulting flag   All flags are conjugate (as the general linear group acts transitively on bases), so any matrix that stabilises a flag is similar to one that stabilises the standard flag.

Any complex square matrix is triangularizable.[1] In fact, a matrix A over a field containing all of the eigenvalues of A (for example, any matrix over an algebraically closed field) is similar to a triangular matrix. This can be proven by using induction on the fact that A has an eigenvector, by taking the quotient space by the eigenvector and inducting to show that A stabilises a flag, and is thus triangularizable with respect to a basis for that flag.

A more precise statement is given by the Jordan normal form theorem, which states that in this situation, A is similar to an upper triangular matrix of a very particular form. The simpler triangularization result is often sufficient however, and in any case used in proving the Jordan normal form theorem.[1][2]

In the case of complex matrices, it is possible to say more about triangularization, namely, that any square matrix A has a Schur decomposition. This means that A is unitarily equivalent (i.e. similar, using a unitary matrix as change of basis) to an upper triangular matrix; this follows by taking an Hermitian basis for the flag.

Simultaneous triangularisabilityEdit

A set of matrices   are said to be simultaneously triangularisable if there is a basis under which they are all upper triangular; equivalently, if they are upper triangularizable by a single similarity matrix P. Such a set of matrices is more easily understood by considering the algebra of matrices it generates, namely all polynomials in the   denoted   Simultaneous triangularizability means that this algebra is conjugate into the Lie subalgebra of upper triangular matrices, and is equivalent to this algebra being a Lie subalgebra of a Borel subalgebra.

The basic result is that (over an algebraically closed field), the commuting matrices   or more generally   are simultaneously triangularizable. This can be proven by first showing that commuting matrices have a common eigenvector, and then inducting on dimension as before. This was proven by Frobenius, starting in 1878 for a commuting pair, as discussed at commuting matrices. As for a single matrix, over the complex numbers these can be triangularized by unitary matrices.

The fact that commuting matrices have a common eigenvector can be interpreted as a result of Hilbert's Nullstellensatz: commuting matrices form a commutative algebra   over   which can be interpreted as a variety in k-dimensional affine space, and the existence of a (common) eigenvalue (and hence a common eigenvector) corresponds to this variety having a point (being non-empty), which is the content of the (weak) Nullstellensatz. In algebraic terms, these operators correspond to an algebra representation of the polynomial algebra in k variables.

This is generalized by Lie's theorem, which shows that any representation of a solvable Lie algebra is simultaneously upper triangularizable, the case of commuting matrices being the abelian Lie algebra case, abelian being a fortiori solvable.

More generally and precisely, a set of matrices   is simultaneously triangularisable if and only if the matrix   is nilpotent for all polynomials p in k non-commuting variables, where   is the commutator; for commuting   the commutator vanishes so this holds. This was proven in (Drazin, Dungey & Gruenberg 1951); a brief proof is given in (Prasolov 1994, pp. 178–179). One direction is clear: if the matrices are simultaneously triangularisable, then   is strictly upper triangularizable (hence nilpotent), which is preserved by multiplication by any   or combination thereof – it will still have 0s on the diagonal in the triangularizing basis.


Because the product of two upper triangular matrices is again upper triangular, the set of upper triangular matrices forms an algebra. Algebras of upper triangular matrices have a natural generalization in functional analysis which yields nest algebras on Hilbert spaces.

A non-square (or sometimes any) matrix with zeros above (below) the diagonal is called a lower (upper) trapezoidal matrix. The non-zero entries form the shape of a trapezoid.

Borel subgroups and Borel subalgebrasEdit

The set of invertible triangular matrices of a given kind (upper or lower) forms a group, indeed a Lie group, which is a subgroup of the general linear group of all invertible matrices. A triangular matrix is invertible precisely when its diagonal entries are invertible (non-zero).

Over the real numbers, this group is disconnected, having   components accordingly as each diagonal entry is positive or negative. The identity component is invertible triangular matrices with positive entries on the diagonal, and the group of all invertible triangular matrices is a semidirect product of this group and diagonal entries with   on the diagonal, corresponding to the components.

The Lie algebra of the Lie group of invertible upper triangular matrices is the set of all upper triangular matrices, not necessarily invertible, and is a solvable Lie algebra. These are, respectively, the standard Borel subgroup B of the Lie group GLn and the standard Borel subalgebra   of the Lie algebra gln.

The upper triangular matrices are precisely those that stabilize the standard flag. The invertible ones among them form a subgroup of the general linear group, whose conjugate subgroups are those defined as the stabilizer of some (other) complete flag. These subgroups are Borel subgroups. The group of invertible lower triangular matrices is such a subgroup, since it is the stabilizer of the standard flag associated to the standard basis in reverse order.

The stabilizer of a partial flag obtained by forgetting some parts of the standard flag can be described as a set of block upper triangular matrices (but its elements are not all triangular matrices). The conjugates of such a group are the subgroups defined as the stabilizer of some partial flag. These subgroups are called parabolic subgroups.


The group of 2 by 2 upper unitriangular matrices is isomorphic to the additive group of the field of scalars; in the case of complex numbers it corresponds to a group formed of parabolic Möbius transformations; the 3 by 3 upper unitriangular matrices form the Heisenberg group.

Forward and back substitutionEdit

A matrix equation in the form   or   is very easy to solve by an iterative process called forward substitution for lower triangular matrices and analogously back substitution for upper triangular matrices. The process is so called because for lower triangular matrices, one first computes  , then substitutes that forward into the next equation to solve for  , and repeats through to  . In an upper triangular matrix, one works backwards, first computing  , then substituting that back into the previous equation to solve for  , and repeating through  .

Notice that this does not require inverting the matrix.

Forward substitutionEdit

The matrix equation Lx = b can be written as a system of linear equations


Observe that the first equation ( ) only involves  , and thus one can solve for   directly. The second equation only involves   and  , and thus can be solved once one substitutes in the already solved value for  . Continuing in this way, the  -th equation only involves  , and one can solve for   using the previously solved values for  .

The resulting formulas are:


A matrix equation with an upper triangular matrix U can be solved in an analogous way, only working backwards.


Forward substitution is used in financial bootstrapping to construct a yield curve.

See alsoEdit



unit upper triangular matrix
a unitriangular upper triangular matrix
unit lower triangular matrix
a unitriangular lower triangular matrix


  1. ^ a b c (Axler 1996, pp. 86–87, 169)
  2. ^ (Herstein 1975, pp. 285–290)
  • Axler, Sheldon (1996), Linear Algebra Done Right, Springer-Verlag, ISBN 0-387-98258-2
  • Drazin, M. P.; Dungey, J. W.; Gruenberg, K. W. (1951), "Some theorems on commutative matrices", J. London Math. Soc., 26 (3): 221–228, doi:10.1112/jlms/s1-26.3.221
  • Herstein, I. N. (1975), Topics in Algebra (2nd ed.), John Wiley and Sons, ISBN 0-471-01090-1
  • Prasolov, Viktor (1994), Problems and theorems in linear algebra, ISBN 9780821802366