Options (2)
Create a random integer matrix:
Compute the upper triangular decomposition:
Now compute an upper triangular decomposition modulo a prime:
Create a random integer matrix:
Compute the full row echelon decomposition {rred,c} such that rred is in reduced row echelon form and c.mat==rred:
Check the result:
Properties and Relations (13)
Create a symmetric positive definite matrix:
Check that it is actually positive definite:
Compute the upper triangular decomposition:
Check that the decomposition is correct, now using the inverse of c and multiplying by u to recover mat:
We can get a different upper triangular factorization using CholeskyDecomposition:
Check the result:
Another factorization with an upper triangular factor is obtained using QRDecomposition:
Check the result:
We get yet another triangular factorization of mat using LUDecomposition:
Recover the two triangular factors:
Check that the product of these factors gives mat transformed by the permutation perm used by LUDecomposition:
Use the permutation and lower factor to find the conversion matrix for an upper triangular decomposition:
Check this:
One will notice that of all these factorizations, only UpperTriangularizeMatrix avoids both fractions and radicals.
Possible Issues (2)
If the input matrix is approximate the full echelon form will be computed:
This is different from the exact case: