# upper_triangularize function

A matrix with the entries below the diagonal set to zero.

## How to write it

### upper_triangularize(matrix)

**matrix**

A matrix, written as a list of rows. Takes a matrix, written as a list of rows.

## Examples

- $\displaystyle \operatorname{upper\_triangularize}\left(\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\right) = \begin{pmatrix} 1 & 2 \\ 0 & 4 \end{pmatrix}$

  `upper_triangularize([[1, 2], [3, 4]])`

  In the solver, `upper_triangularize([[1, 2], [3, 4]])` gives `[[1, 2], [0, 4]]`.

  [Open in the solver](https://hilberon.com/?q=upper_triangularize%28%5B%5B1%2C%202%5D%2C%20%5B3%2C%204%5D%5D%29)

## Related functions

- [lower_triangularize](https://hilberon.com/library/lower_triangularize)

  A matrix with the entries above the diagonal set to zero.
- [adjugate](https://hilberon.com/library/adjugate)

  Adjugate of a square matrix: the transpose of its cofactors.
- [transpose](https://hilberon.com/library/transpose)

  Transpose of a matrix: its rows become its columns.
- [characteristic_polynomial](https://hilberon.com/library/characteristic_polynomial)

  Characteristic polynomial of a square matrix in a variable.
- [trace](https://hilberon.com/library/trace)

  Trace of a square matrix: the sum of its diagonal.
- [cholesky_decomposition](https://hilberon.com/library/cholesky_decomposition)

  Cholesky decomposition of a symmetric positive definite matrix.

---
Source: https://hilberon.com/library/upper_triangularize
