Matrix Calculator
Add, subtract and multiply matrices up to 10 × 10, or get the determinant, inverse, transpose, rank and row-reduced form. Answers are exact fractions. How it works
Use the Matrix Calculator
About the Matrix Calculator
For A = [1 2; 3 4] the determinant is -2 and the inverse is [-2 1; 3/2 -1/2]. This matrix calculator adds, subtracts and multiplies matrices up to 10 × 10 and finds the transpose, determinant, inverse, rank and row-reduced form, with every result an exact fraction. For the inverse and the row-reduced form it can list every row operation, up to 5 × 5.
Determinant, rank and inverse of small matrices
| Matrix A | Determinant | Rank | Inverse |
|---|---|---|---|
| [1 2; 3 4] | -2 | 2 | [-2 1; 3/2 -1/2] |
| [2 1; 1 1] | 1 | 2 | [1 -1; -1 2] |
| [4 7; 2 6] | 10 | 2 | [3/5 -7/10; -1/5 2/5] |
| [1 2; 2 4] | 0 | 1 | None (singular) |
| [2 0 0; 0 3 0; 0 0 4] | 24 | 3 | [1/2 0 0; 0 1/3 0; 0 0 1/4] |
| [1 2 3; 0 1 4; 5 6 0] | 1 | 3 | [-24 18 5; 20 -15 -4; -5 4 1] |
| [1 2 3; 4 5 6; 7 8 9] | 0 | 2 | None (singular) |
| [1 2 3; 4 5 6; 7 8 10] | -3 | 3 | [-2/3 -4/3 1; -2/3 11/3 -2; 1 -2 1] |
| [2 -1 0; -1 2 -1; 0 -1 2] | 4 | 3 | [3/4 1/2 1/4; 1/2 1 1/2; 1/4 1/2 3/4] |
| [1 1/2 1/3; 1/2 1/3 1/4; 1/3 1/4 1/5] | 1/2160 | 3 | [9 -36 30; -36 192 -180; 30 -180 180] |
Rows are separated by semicolons here. In the tool, put each row on its own line.
Every operation on A = [1 2; 3 4] and B = [5 6; 7 8]
| Operation | Result |
|---|---|
| A + B | [6 8; 10 12] |
| A − B | [-4 -4; -4 -4] |
| A × B | [19 22; 43 50] |
| B × A | [23 34; 31 46] |
| 2 × A | [2 4; 6 8] |
| Transpose of A | [1 3; 2 4] |
| Determinant of A | -2 |
| Inverse of A | [-2 1; 3/2 -1/2] |
| Rank of A | 2 |
| Row-reduced form of A | [1 0; 0 1] |
For B × A, type B’s values into the Matrix A box and A’s into Matrix B.
How to use this tool
- Type matrix A with one row per line and the values separated by spaces. A value can be a decimal such as 2.5 or a fraction such as 3/4.
- Type matrix B if the operation uses it. Only A + B, A − B and A × B do.
- Press the operation. For k × A, enter the number k in the field that appears.
- For the inverse or the row-reduced form, press Show steps to list each row operation and the matrix after it (up to 5 × 5).
- Switch between Fractions and Decimals, or press Copy to take the result as tab-separated text.
Frequently asked questions
- How do you multiply two matrices?
- Each cell of the product is a row of the first matrix times a column of the second, added up. For A = [1 2; 3 4] and B = [5 6; 7 8] the top-left cell is 1 × 5 + 2 × 7 = 19, and the whole product is [19 22; 43 50]. A has to have as many columns as B has rows.
- Is A × B the same as B × A?
- Usually not. With A = [1 2; 3 4] and B = [5 6; 7 8], A × B is [19 22; 43 50] and B × A is [23 34; 31 46].
- How do I find the inverse of a 2 × 2 matrix?
- For [a b; c d], swap a and d, change the signs of b and c, and divide every entry by the determinant ad − bc. For [4 7; 2 6] the determinant is 10, so the inverse is [3/5 -7/10; -1/5 2/5].
- What does it mean when a matrix is singular?
- Its determinant is 0, so it has no inverse. [1 2; 2 4] is singular because the second row is twice the first, and its rank is 1. [1 2 3; 4 5 6; 7 8 9] is singular too, with rank 2.
- What is the rank of a matrix?
- The number of pivots left after row reduction, which is the number of independent rows. The 2 × 3 matrix [1 2 3; 4 5 6] can have a rank of 2 at most, and it does: its row-reduced form is [1 0 -1; 0 1 2].
- Can it solve a system of linear equations?
- There is no equation solver, but the row-reduced form gets you there by hand. Type the augmented matrix, with the constants as the last column, and read the solution from the last column of the result. For x + 2y = 5 and 3x + 4y = 6, [1 2 5; 3 4 6] reduces to [1 0 -4; 0 1 9/2], so x = -4 and y = 9/2. That reading works when the left part reduces to the identity. A row 0 0 1 means no solution: x + y = 2 with 2x + 2y = 5 gives [1 1 0; 0 0 1]. A row of zeros means infinitely many: x + y = 2 with 2x + 2y = 4 gives [1 1 2; 0 0 0], and y is free.
Related Tools
View all toolsPrime Factorization Calculator
Prime factorization of any whole number from 2 to 999,999,999,999, shown as a product and as powers: 360 = 2^3 × 3^2 × 5.
Quadratic Equation Solver
Solve ax² + bx + c = 0 for real or complex roots, with the discriminant, vertex, axis of symmetry, step list and a parabola plot.
LCM and GCD Calculator
GCD (also called GCF or HCF) and LCM of 2 to 10 whole numbers, with the Euclidean steps and the prime factors of each number shown.
Standard Deviation
Standard deviation calculator for a list of numbers: population σ and sample s side by side, both variances, plus mean, median, minimum, maximum, range and sum.
Percentage Calculator
Percentage calculator for seven questions: X% of Y, X is what % of Y, percent change, percent difference, X is Y% of what, and a percent increase or decrease.
RREF Calculator
Reduce a matrix of up to 6 × 6 to reduced row echelon form by Gauss-Jordan elimination, with rank, pivot columns and row steps, as decimals or exact fractions.