Skip to content
YouNeed Tools
Free VPN

Matrix Calculator

Pick a size and an operation, type the entries, and get an exact answer in fractions, with the determinant working and a check for inverses.

Size
Matrix A

Whole numbers, decimals or fractions like 3/4. Answers are exact fractions. Up to 4 × 4.

−24185
20−15−4
−541

Working

  1. det(A) = 1, which is not 0, so A has an inverse.
  2. Gauss–Jordan elimination on [A | I] turns the left side into I; the right side is then A⁻¹.
  3. Check: A × A⁻¹ = I ✓

Worked out on your device.

Worked example

Invert A = [4, 7] [2, 6]. The determinant is 4 × 6 − 7 × 2 = 10, which is not 0, so A has an inverse. Swap 4 and 6, change the signs of 7 and 2, and divide by 10: A⁻¹ = [3/5, −7/10] [−1/5, 2/5]. Multiplying A by A⁻¹ gives the identity matrix [1, 0] [0, 1], which confirms it.

Order matters in multiplication

With B = [1, 2] [3, 4] and C = [5, 6] [7, 8]: B × C = [19, 22] [43, 50], but C × B = [23, 34] [31, 46]. Each entry of a product is a row of the first matrix times a column of the second, added up: the top-left of B × C is 1 × 5 + 2 × 7 = 19.

Determinants of 3×3 matrices

Expand along the first row: det = a₁₁M₁₁ − a₁₂M₁₂ + a₁₃M₁₃, where each M is the 2×2 determinant left after crossing out that entry’s row and column. The signs alternate +, −, +. For 4×4 matrices the calculator row-reduces to a triangular matrix instead, which is quicker: the determinant is the product of the diagonal, with the sign changed for each row swap.

Where matrices are used

Solving systems of linear equations (x = A⁻¹b), rotating and scaling images and 3D models, Markov chains and Google-style ranking, economics input-output tables, and the layers of neural networks all come down to the operations here. Spreadsheets have them too: MDETERM, MINVERSE and MMULT in Excel and Google Sheets, though those work in decimals.

Related tools

Sources

Checked on November 26, 2026:

Frequently asked questions

How do I find the inverse of a matrix?
A square matrix has an inverse only if its determinant is not 0. For a 2×2 matrix [a b; c d] the inverse is 1/(ad − bc) × [d −b; −c a]. For bigger matrices the calculator uses Gauss–Jordan elimination: it row-reduces [A | I] until the left half is the identity, and the right half is then A⁻¹.
What does the determinant tell me?
Whether the matrix can be inverted (non-zero) or not (zero), and how much the matrix scales area (2×2) or volume (3×3). A negative determinant means the transformation flips orientation.
Why are the answers fractions?
Because inverses of whole-number matrices are usually fractions. Keeping exact fractions avoids rounding errors like 0.333333; hover over a fraction to see the decimal.
Can I multiply matrices in either order?
No. Matrix multiplication is not commutative: A × B and B × A usually differ, as the example below shows. For A × B, the number of columns of A must equal the number of rows of B.
Can I type decimals and fractions?
Yes. Entries can be whole numbers, decimals such as 0.25 or fractions such as 3/4 and −5/2. Blank cells count as 0.
How do I copy the result?
Use the copy button: the matrix is copied with tabs between columns, so it pastes straight into a spreadsheet.

Last updated: 2026-11-26