b2KIT

Matrix Decomposition Tool

Compute LU, QR, SVD, and Cholesky decompositions with step-by-step explanations and factor matrix visualization.

Tested tool guide Tested browser tools Checked August 16, 2026

What Matrix Decomposition Tool does, with a checked example

Depending on its shape and properties, a matrix entered here can be analyzed with one or more of four factorizations: LU for triangular factors, QR for orthogonal and triangular factors, SVD for singular vectors and singular values, or Cholesky for a triangular factor paired with its transpose. The tool shows the factor matrices, explanatory steps, and a visual representation of their entries. The main source of confusion is that these methods are not interchangeable: Cholesky has stricter input requirements, while pivoting, signs, ordering, and reduced versus full forms can make other valid results look different.

Worked example

A concrete input and expected output from the current implementation.

Input

Decomposition: Cholesky
Matrix:
4 0
0 9

Expected output

L =
2 0
0 3

L^T =
2 0
0 3

L L^T =
4 0
0 9

The positive diagonal entries have square roots 2 and 3. Multiplying the lower-triangular factor by its transpose gives diagonal entries 2 squared = 4 and 3 squared = 9, with zero off-diagonal entries.

How the result is produced

1

Choose the factorization

Supply the matrix as rectangular rows of numeric entries, then select LU, QR, SVD, or Cholesky. The selected method determines the factor identity to display: an LU result uses triangular factors, QR separates an orthogonal factor from an upper-triangular factor, SVD separates two singular-vector factors and a diagonal singular-value factor, and Cholesky produces a triangular factor paired with its transpose.

2

Read and verify the factors

The step display identifies the factors and the matrix equation they satisfy. Read that equation carefully because LU may include a permutation matrix, and QR or SVD may be shown in reduced or full form. Factor visualization helps compare shapes and entry magnitudes, but correctness is determined by multiplying the factors in the stated order and reconstructing the original matrix within the displayed numerical precision.

Good uses

  • Check an LU factorization before using triangular systems to solve several equations with the same coefficient matrix.
  • Inspect QR factors while studying orthogonal bases, least-squares calculations, or the relationship between a matrix's columns and an upper-triangular factor.
  • Compare singular values or test whether a symmetric positive-definite matrix has the expected Cholesky factor.

Limits and checks

  • Rounded displayed entries may not reproduce the original matrix exactly when multiplied; small residual differences do not necessarily indicate a wrong decomposition.
  • QR and SVD factors are not always unique. Sign changes in paired vectors, and ordering choices in an SVD, can produce different but equivalent answers.
  • A real Cholesky factorization requires a symmetric positive-definite matrix. Symmetry alone is insufficient, and a zero or negative direction prevents the standard positive-diagonal factorization.

Common questions

Why does the result differ from my textbook or another calculator?

Different answers can represent the same decomposition. LU may expose row permutations differently, QR columns can have opposite signs when the matching rows of R also change sign, and SVD singular-vector pairs can change signs together. SVD implementations may also order singular values differently. Compare the stated factor equation and reconstruct the input instead of comparing every factor entry directly.

Can I apply all four decompositions to every matrix?

No. SVD is defined for any real rectangular matrix, and QR also supports rectangular matrices, although the reported factor shapes can depend on whether a full or reduced form is used. Cholesky requires a real symmetric positive-definite matrix. LU may need row permutations, so include any displayed permutation factor when checking whether its product reconstructs the original matrix.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools