Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

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

  • upper_triangularize⁡((1234))=(1204)\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