LowerTriangularMatrixQ

LowerTriangularMatrixQ[m]

gives True if m is lower triangular, and False otherwise.

LowerTriangularMatrixQ[m,k]

gives True if m is lower triangular starting down from the k^(th) diagonal, and False otherwise.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Test if a matrix is lower triangular:

Test if a matrix is lower triangular starting from the first superdiagonal:

Test if a matrix is lower triangular starting from the first subdiagonal:

Scope  (7)

Test if a real machine-number matrix is lower triangular:

A complex matrix:

An exact matrix:

An arbitrary-precision matrix:

Test a sparse matrix:

Test whether an explicitly symmetric matrix is upper triangular:

Test a symbolic matrix:

The matrix is lower triangular when b=0:

Test rectangular upper-triangular matrices:

Test if matrices have nonzero entries starting from a particular superdiagonal:

Test if matrices have nonzero entries starting from a particular subdiagonal:

The following matrix is lower triangular but not with respect to the first subdiagonal:

Options  (1)

Tolerance  (1)

This matrix is not lower triangular:

Add the Tolerance option to consider numbers smaller than 10-12 to be zero:

Applications  (2)

LUDecomposition decomposes a matrix as a product of upper and lowertriangular matrices, returned as a triple {lu,perm,cond}:

Form the canonical matrices l and u from the composite matrix lu:

Display the three matrices:

Verify that l and u are lower and upper triangular, respectively:

Reconstruct the original matrix as a permutation of the product of l and u:

JordanDecomposition relates any matrix to an upper-triangular matrix via a similarity transformation m=s.j.TemplateBox[{s}, Inverse]:

Visualize the three matrices:

Verify that the Jordan matrix is upper triangular and similar to the original matrix:

The matrix is diagonalizable iff its Jordan matrix is also lower triangular:

Properties & Relations  (9)

LowerTriangularMatrixQ returns False for inputs that are not matrices:

Matrices of dimensions {n,0} are lower triangular:

LowerTriangularize returns matrices that are LowerTriangularMatrixQ:

The inverse of a lower-triangular matrix is lower triangular:

This extends to arbitrary powers and functions:

The product of two (or more) lower-triangular matrices is lower triangular:

The determinant of a triangular matrix equals the product of the diagonal entries:

Eigenvalues of a triangular matrix equal its diagonal elements:

LowerTriangularMatrixQ[m,0] is equivalent to LowerTriangularMatrixQ[m]:

A matrix is lower triangular starting at diagonal iff its transpose is upper triangular starting at diagonal :

Introduced in 2019
 (12.0)