Skip to content
ToolUlkaa Tool
All tools

Mathematics

Percentage CalculatorFraction CalculatorEquation SolverTensorMatrix CalculatorUnit ConverterNumber Base ConverterDerivative CalculatorIntegral CalculatorLimit CalculatorAlgebra CalculatorQuadratic Formula CalculatorFactoring CalculatorLogarithm CalculatorSquare Root CalculatorLong Division CalculatorSignificant Figures CalculatorLCM and GCF CalculatorPrime Factorization CalculatorTriangle CalculatorPythagorean Theorem CalculatorSlope CalculatorArea CalculatorVolume CalculatorScientific CalculatorGraphing Calculator

Categories

AcademicTextMathematicsStatisticsMachine LearningAIData ScienceFile
All tools
Mathematics

LU Decomposition Calculator

Factor a square matrix into a lower and an upper triangular matrix, with exact fractions.

Matrix A
× same

Enter integers, decimals or fractions such as 3/4. Blank cells count as 0.

Show decimals instead of fractions, in the steps too

LU decomposition (A = LU)

L=[10001012−321],  U=[2130−1400192]L=\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ \frac{1}{2} & -\frac{3}{2} & 1 \end{bmatrix},\;U=\begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 0 & 0 & \frac{19}{2} \end{bmatrix}L=​1021​​01−23​​001​​,U=​200​1−10​34219​​​

Steps

  1. 1R3 ← R3 − 1/2·R1
    [2130−14125]\begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 1 & 2 & 5 \end{bmatrix}​201​1−12​345​​
    ↓
    [2130−1403272]\begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 0 & \frac{3}{2} & \frac{7}{2} \end{bmatrix}​200​1−123​​3427​​​

    The multiplier l31 = 1/2 goes into L.

  2. 2R3 ← R3 − -3/2·R2
    [2130−1403272]\begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 0 & \frac{3}{2} & \frac{7}{2} \end{bmatrix}​200​1−123​​3427​​​
    ↓
    [2130−1400192]\begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 0 & 0 & \frac{19}{2} \end{bmatrix}​200​1−10​34219​​​

    The multiplier l32 = -3/2 goes into L.

  3. 3Check the product
    A=[2130−14125]A=\begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 1 & 2 & 5 \end{bmatrix}A=​201​1−12​345​​
    ↓
    LU=[2130−14125]LU=\begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 1 & 2 & 5 \end{bmatrix}LU=​201​1−12​345​​

    Multiplying L and U gives back the (row-permuted) matrix.

  1. Tools
  2. Mathematics
  3. Matrix Calculator
  4. LU Decomposition Calculator

About LU Decomposition Calculator

This calculator factors a square matrix up to 6 × 6 as A = LU, where L is lower triangular with 1s on its diagonal and U is upper triangular. For [[2, 1], [4, 3]] it finds L = [[1, 0], [2, 1]] and U = [[2, 1], [0, 1]]. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.

It works by Gaussian elimination. Each time it subtracts a multiple of a pivot row from a row below, that multiplier is saved in L, and the reduced matrix becomes U. Every row operation is shown as a before and after matrix, and the last step multiplies L and U to check that the product gives the matrix back.

If a pivot is zero the calculator swaps in a row below it and records the swap in a permutation matrix P, so the result is PA = LU. A singular matrix still factors, with a zero on the diagonal of U. All entries are exact fractions, so no rounding error enters the factors.

How to use LU Decomposition Calculator

  1. 1Choose an operation, such as Determinant, Inverse or A × B.
  2. 2Set the size of matrix A with the row and column selectors. Square operations use a square grid, and two-matrix operations also show matrix B.
  3. 3Type the entries. Use integers, decimals or fractions like 3/4, and leave a cell blank for zero.
  4. 4The tool opens on a worked example. Read the result, typeset as a determinant, a rank or a matrix.
  5. 5Read the steps for the working, and use the decimal switch if you would rather see decimals than fractions.

Features

  • Grids up to 6 × 6, with rows and columns set separately for non-square matrices.
  • Addition, subtraction and multiplication of two matrices, with a clear message when the sizes do not match.
  • Determinant with the 2 × 2 rule, first-row expansion for 3 × 3 and row reduction for larger matrices.
  • Inverse by row-reducing [A | I], with a plain message when the matrix is singular.
  • Rank and reduced row echelon form with each row operation listed.
  • Adjugate and cofactor matrix for square matrices.
  • Eigenvalues from the characteristic polynomial, including complex ones, with eigenvectors: exact for rational eigenvalues and numeric (labelled) for irrational ones.
  • LU decomposition (with row swaps when a pivot is zero) and QR decomposition by Gram-Schmidt, exact with square roots.
  • Fraction entries and fraction results, with a switch to decimals that also applies to the steps.
  • Transpose of any matrix.

What the factors mean

L holds the elimination multipliers and U is the result of the elimination.

A = LU          (no row swaps)
PA = LU         (with row swaps)
l_ik = a_ik / a_kk  at the time of elimination

Worked examples

  • [[2, 1], [4, 3]] → gives L = [[1, 0], [2, 1]], U = [[2, 1], [0, 1]]

    The multiplier 4 ÷ 2 = 2 goes into L, and R2 − 2·R1 turns the second row into [0, 1].

  • [[2, 1, 1], [4, 3, 3], [8, 7, 9]] → gives L = [[1, 0, 0], [2, 1, 0], [4, 3, 1]], U = [[2, 1, 1], [0, 1, 1], [0, 0, 2]]

    The multipliers are 2, 4 and then 3. Multiplying L by U returns the original matrix.

Privacy: how it works

  • All the arithmetic runs in your browser tab. Your matrices are not sent to Ulkaa or anyone else, and there is nothing to sign in to.

Tips

  • Write fractions as 3/4 rather than 0.75 if you want results to stay exact.
  • Leave entries blank for zero instead of typing every zero in a large grid.
  • To solve a linear system, put the coefficients and constants in one grid and use RREF, or use the equation solver.
  • Multiplication is not commutative. To check AB against BA, swap which matrix is A and which is B.

Frequently asked questions

Is it really free?

Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.

Do I need an account?

No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.

Does it run in my browser?

Yes. Your matrices are processed by code running in your browser tab, on your own device.

Is my data uploaded?

No. Your matrices are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.

What is LU decomposition used for?

It splits a matrix into two triangular factors that are easy to solve with. Once A = LU is known, solving Ax = b is two quick substitutions, and the determinant is the product of the diagonal of U (with a sign for any swaps).

Why does the answer sometimes say PA = LU?

A zero pivot cannot be used to eliminate the rows below it, so a row swap is needed. The swaps are collected in a permutation matrix P that is applied to A first.

Does every square matrix have an LU decomposition?

Every square matrix has one once row swaps are allowed. Without swaps it exists only when no zero pivot appears during elimination.

More Matrix Calculator pages

  • Matrix CalculatorAdd, multiply, invert, decompose (LU, QR) and analyse matrices up to 6 × 6, with typeset working.
  • Matrix Determinant CalculatorFind the determinant of any square matrix up to 6 × 6.
  • Inverse Matrix CalculatorFind A⁻¹ for a square matrix, or learn why it does not exist.
  • Matrix Multiplication CalculatorMultiply matrix A by matrix B.
  • Matrix Addition CalculatorAdd or subtract two matrices of the same size.
  • Matrix Transpose CalculatorSwap the rows and columns of a matrix.
  • Matrix Rank CalculatorFind how many independent rows a matrix has.
  • Eigenvalue CalculatorFind the eigenvalues of a square matrix and see the characteristic polynomial.
  • 2x2 Matrix Determinant CalculatorEnter a, b, c and d to get ad − bc.
  • 3x3 Matrix Determinant CalculatorExpand a 3 × 3 determinant along the first row with every minor shown.
  • 3x3 Inverse Matrix CalculatorInvert a 3 × 3 matrix with every row operation listed.
  • RREF CalculatorRow-reduce any matrix up to 6 × 6 to reduced row echelon form.
  • Adjugate and Cofactor Matrix CalculatorGet the cofactor matrix, its transpose the adjugate, and the determinant.

Ulkaa Apps

  • Ulkaa
  • Calendar
  • Task
  • Note
  • Disk
  • Call
  • Contact
  • Mail
  • Finance
  • Health
  • Office
  • Work
  • Workspace
  • Halum
  • Jaal
  • Islam
  • Game
  • Weather
  • Campus
  • News
  • Developer
  • Help
  • Account
About·Privacy·Terms·© 2026 Ulkaa

What is Ulkaa Tool?

Ulkaa Tool is a free collection of fast, privacy-friendly online tools from Ulkaa Network. Calculate your GPA and CGPA, edit rich text, count words and characters, replace text and more — all in your browser.

Every tool runs entirely in your browser — no sign-up, and your data never leaves your device.

Academic

  • GPA Calculator
  • CGPA Calculator
  • Citation Generator
  • Quiz Maker

Text

  • Rich Text Editor
  • Word Counter
  • Character Counter
  • Text Replacement

Ulkaa

  • Ulkaa
  • Ulkaa News
  • Ulkaa Campus
  • Ulkaa Tool
  • Ulkaa Game
  • Ulkaa Weather
  • Ulkaa Islam

Company

  • About Ulkaa
  • Careers
  • Support
  • Help
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Sitemap

© 2015-26, Ulkaa. All rights reserved.
Facebook PageLinkedIn CompanyX (Twitter) ProfileInstagram ProfileGitHub Account