# Definition:Triangular Matrix/Upper Triangular Matrix

## Definition

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.

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

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

## Also defined as

Some sources define an upper triangular matrix only as a square matrix.

## Examples

### Upper Triangular Matrix with fewer Rows than Columns

An upper triangular matrix of order $m \times n$ such that $m < n$:

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

### Upper Triangular Matrix with more Rows than Columns

An upper triangular matrix of order $m \times n$ such that $m > n$:

$\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} \\ 0 & 0 & 0 & \cdots & 0 & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & 0 & \cdots & 0 & 0 \\ 0 & 0 & 0 & \cdots & 0 & 0 \\ \end{bmatrix}$

### Square Upper Triangular Matrix

$\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}$

### Example of Square Upper Triangular Matrix

This is an arbitrary example of an upper triangular square matrix:

$\begin {pmatrix} 1 & 2 & 3 & 4 \\ 0 & 5 & 6 & 7 \\ 0 & 0 & 8 & 9 \\ 0 & 0 & 0 & 10 \end {pmatrix}$

### Example of Non-Square Upper Triangular Matrix

This is an arbitrary example of an upper triangular matrix which is specifically not square:

$\begin {pmatrix} 1 & 2 & 3 & 4 \\ 0 & 5 & 6 & 7 \\ 0 & 0 & 8 & 9 \\ 0 & 0 & 0 & 10 \\ 0 & 0 & 0 & 0 \end {pmatrix}$

### Upper Triangular Matrix not in Echelon Form

This is an arbitrary example of an upper triangular square matrix which is specifically not in echelon form (non-unity variant):

$\begin {pmatrix} 1 & 2 & 3 & 4 \\ 0 & 0 & 6 & 7 \\ 0 & 0 & 8 & 9 \\ 0 & 0 & 0 & 10 \end {pmatrix}$