# Definition:Triangular Matrix

## Definition

Let $\mathbf T = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \\ \end{bmatrix}$ be a square matrix of order $n$.

Then $\mathbf T$ is a triangular matrix if all the elements either above or below the diagonal are zero.

### Upper Triangular Matrix

An upper triangular matrix is a matrix in which all the lower triangular elements are zero.

That is, all the non-zero elements are on the main diagonal or in the upper triangle:

$\mathbf U = \begin{bmatrix} a_{11} & a_{12} & a_{13} & \cdots & a_{1, n - 1} & a_{1n} \\ 0 & a_{22} & a_{23} & \cdots & a_{2, n - 1} & a_{2n} \\ 0 & 0 & a_{33} & \cdots & a_{3, n - 1} & a_{3n} \\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & 0 & \cdots & a_{n - 1, n - 1} & a_{n - 1, n} \\ 0 & 0 & 0 & \cdots & 0 & a_{nn} \\ \end{bmatrix}$

That is, $\mathbf U$ is upper triangular if and only if:

$\forall a_{ij} \in \mathbf U: i > j \implies a_{ij} = 0$

### Lower Triangular Matrix

A lower triangular matrix is a matrix in which all the upper triangular elements are zero.

That is, all the non-zero elements are on the main diagonal or in the lower triangle:

$\mathbf L = \begin{bmatrix} a_{11} & 0 & 0 & \cdots & 0 & 0 \\ a_{21} & a_{22} & 0 & \cdots & 0 & 0 \\ a_{31} & a_{32} & a_{33} & \cdots & 0 & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ a_{n - 1, 1} & a_{n - 1, 2} & a_{n - 1, 3} & \cdots & a_{n - 1, n - 1} & 0 \\ a_{n1} & a_{n2} & a_{n3} & \cdots & a_{n - 1, 1} & a_{nn} \\ \end{bmatrix}$

That is, $\mathbf L$ is lower triangular if and only if:

$\forall a_{ij} \in \mathbf U: i < j \implies a_{ij} = 0$