# Online LU Matrix Decomposition - Calculator

   

## LU Matrix Decomposition

An online calculator that calculates the LU decomposition , if any, of a square matrix is presented.
An $LU$ decomposition of a given matrix $A$ can be written as $A = L U$ where $L$ is a lower triangular matrix and $U$ is an upper triangualar matrix.
Not all square matrices have an LU decomposition.
An invertible matrix $A$ has an $LU$ decomposition if and only if all its leading principal minors are different from zero.

## How to Use the Calculator

Enter the number of columns (and rows) $n$ below, click on "Generate Matrix" to generate a matrix with random values of its elements. You may change the values of the elements by entring new values and click on "Update Matrix". You may enter the values of the elements of the matrix as integers, decimal numbers such as 1.2 or fractions such as -4/5.
The values of the leading principal minors ( $D_1$, $D_2$ .... ) are displayed and also the LU decomposition if any.
Enter Number of columns (and rows) $n =$

Click here to enter $n$ and generate a
matrix whose elemenst have random values

Change values of coefficients in above matrix
(if needed) and click

NOTE that any decomposition with outputs such as " NaN " or " Infinity " is not valid and means that the matrix does not have an LU decompostion.

=