LU Decomposition Calculator
Enter the four entries of your 2×2 matrix to compute its L and U factors.
Result
How it is calculated
The 2×2 matrix is entered as rows [a, b; c, d]. The Doolittle method keeps the diagonal of L equal to 1 and finds l21 = c / a and u22 = d − l21 × b. The first row of U is copied unchanged from the matrix, so L = [1, 0; l21, 1] and U = [a, b; 0, u22], which multiply back to the original matrix. The determinant is the product of U's diagonal, det = a × u22. Entries are shown to four decimals. The tool does no row swapping (pivoting), so it gives no result when a = 0, even though such a matrix may still be invertible after a swap.
Worked example
Take the matrix with rows [4, 3] and [6, 3]. First l21 = 6 / 4 = 1.5, so L is [1, 0; 1.5000, 1]. Next u22 = 3 − 1.5 × 3 = −1.5, so U is [4.0000, 3.0000; 0, −1.5000]. Check by multiplying: the second row of LU is 1.5 × [4, 3] + [0, −1.5] = [6, 3], matching the original. The determinant is 4 × (−1.5) = −6, shown as −6.0000.
Common mistakes
- Entering the matrix by columns instead of rows. The fields are a and b for the top row, c and d for the bottom row; swapping b and c transposes the matrix and changes L and U.
- Trying a matrix with a zero in the top-left corner, such as [0, 1; 1, 0]. Without pivoting no plain LU factorisation exists with this method, and the tool returns nothing; swap the rows first and remember the permutation.
- Expecting U to start with 1s on its diagonal. In Doolittle's form the 1s are on L, and U keeps the real pivots, so the first entry of U is just a.
- Reading a determinant of 0 as an error. If u22 comes out as 0 the matrix is singular, which is a valid result: the factorisation exists but cannot be used to solve a system.
- Confusing Doolittle with Crout. Crout puts the 1s on U instead, so L and U from a Crout calculator will not match these matrices even though their product is the same.
About this calculator
LU decomposition factors a matrix A into the product of a lower triangular matrix L and an upper triangular matrix U, so that A = LU. This calculator uses the Doolittle method — which fixes L's diagonal entries to 1 and derives the rest through Gaussian elimination — to factor a 2×2 matrix and also reports its determinant, which falls out directly as the product of U's diagonal entries. It does not swap rows, so the top-left entry a must not be zero; if it is, swap the two rows yourself first.
Once a matrix is split into triangular factors, solving a linear system Ax = b becomes two simple substitution steps instead of one harder elimination, which is why LU decomposition is a core technique in numerical linear algebra, engineering simulations, and computer graphics — anywhere the same system needs to be solved repeatedly for different right-hand sides, since the expensive factorization only needs to be done once.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The point of an LU factorisation is reuse. To solve a system, first solve L y = b by forward substitution, then U x = y by back substitution; once L and U are known, every new right-hand side b costs only those two short passes. You can also multiply L by U yourself to confirm you get the original matrix back. This tool handles 2 by 2 matrices only; tell us if you need 3 by 3 or row swapping.