How it’s calculated
A matrix is a rectangular grid of numbers. Type matrix A with one row per line and the entries separated by spaces. The calculator handles up to 4 × 4. Determinants and inverses are found by Gaussian elimination with partial pivoting: at each step the row with the largest entry in the current column is swapped up, which keeps rounding errors small.
A matrix whose determinant is 0 is singular and has no inverse. Each row is first scaled by its largest entry; a pivot smaller than one trillionth after that is treated as 0, so rounding noise is not mistaken for a real value.
Example: A = [4 7; 2 6]. det = 4×6 − 7×2 = 10. The inverse is (1 ÷ 10) × [6 −7; −2 4] = [0.6 −0.7; −0.2 0.4]. Multiplying A by this inverse gives the identity matrix [1 0; 0 1].
Frequently asked questions
Why does it say the matrix is singular?
A singular matrix has a determinant of 0, which means its rows (or columns) are not independent, for example one row is a multiple of another. Such a matrix has no inverse.
Can I multiply matrices of different sizes?
Yes, as long as the number of columns in A equals the number of rows in B. An m × n matrix times an n × p matrix gives an m × p matrix. Addition needs both matrices to be exactly the same size.
Is matrix multiplication commutative?
No. A × B and B × A are usually different, and one of them may not even exist when the sizes do not match.
How do I enter a matrix?
Type one row per line and separate entries with spaces or commas, for example "4 7" on the first line and "2 6" on the second. Use a point for decimals (0.5).
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- College Algebra 2e, §7.5 Matrices and Matrix Operations — OpenStax
- College Algebra 2e, §7.7 Solving Systems with Inverses (determinant and inverse of a matrix) — OpenStax
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator