Enter one or two matrices and add, subtract, multiply, transpose, invert, raise to a power or find the determinant, with exact fraction answers.
Set the number of rows and columns for each matrix (up to 10 × 10), type the numbers into the boxes, then press an operation. The buttons under each matrix work on that matrix alone: transpose, determinant, inverse, rank, trace and reduced row echelon form (RREF), plus raising it to a power or multiplying every entry by a number. The buttons in the middle combine the two matrices. Entries can be whole numbers, decimals or fractions such as 1/3, and the answers are worked out exactly, so you never see a rounding error where a clean fraction exists. A switch shows the answers as fractions or as decimals.
The page opens with A = [1 2; 3 4] and B = [5 6; 7 8] and shows the product A × B. The top-left entry is 1×5 + 2×7 = 19, the top-right is 1×6 + 2×8 = 22, and so on, giving AB = [19 22; 43 50]. Order matters: BA = [23 34; 31 46], a different matrix, so always check which one you need.
You can only add or subtract matrices of the same size, and you do it entry by entry. For the defaults, A + B = [6 8; 10 12] and A − B = [-4 -4; -4 -4]. Multiplication is different: A × B needs the number of columns of A to equal the number of rows of B, and each entry of the answer is a row of A multiplied term by term with a column of B and added up. If the sizes do not fit, the calculator tells you the sizes and what is needed.
The transpose swaps rows and columns: AT = [1 3; 2 4]. Multiplying by a number multiplies every entry, so 2A = [2 4; 6 8]. Raising a square matrix to a power multiplies it by itself, so A² = [7 10; 15 22], and a negative power uses the inverse.
The determinant is a single number that tells you a lot about a square matrix. For a 2 × 2 matrix [a b; c d] it is ad − bc, so for A it is (1)(4) − (2)(3) = −2. A matrix has an inverse only when its determinant is not zero. For C = [4 7; 2 6] the determinant is 10, and the inverse is [3/5 -7/10; -1/5 2/5]. Multiplying the two gives the identity matrix. If the determinant is zero the matrix is singular and there is no inverse, and the calculator says so. For A the inverse is [-2 1; 3/2 -1/2].
For 2 × 2 and 3 × 3 matrices the calculator also writes out the working. Take M = [2 0 1; 1 3 2; 1 1 4]. The determinant is a(ei − fh) − b(di − fg) + c(dh − eg) = 2(12 − 2) − 0 + 1(1 − 3) = 20 − 2 = 18. It is not zero, so M has an inverse, and M × M−1 is the 3 × 3 identity. For matrices larger than 3 × 3 the determinant is found by row reduction.
A pair of equations such as 4x + 7y = 15 and 2x + 6y = 10 can be written as A·v = b with A = [4 7; 2 6] and b = [15; 10]. Multiply both sides by the inverse and v = A−1b. Using the inverse of C above gives x = (3/5)(15) − (7/10)(10) = 2 and y = (−1/5)(15) + (2/5)(10) = 1. You can check it: 4(2) + 7(1) = 15 and 2(2) + 6(1) = 10. Put b in as a second matrix B with one column and multiply A−1 by it.
RREF is what you reach by row reduction. Put the same system in as an augmented matrix [4 7 15; 2 6 10] and press RREF to get [1 0 2; 0 1 1]. Reading the last column gives x = 2 and y = 1. RREF also shows whether a system has one solution, none or many.
The rank counts how many rows are truly independent. [1 2; 2 4] has rank 1, because the second row is just twice the first, and its determinant is 0. The trace is the sum of the diagonal entries, so tr(A) = 1 + 4 = 5.
Raise [1 1; 1 0] to the 10th power and you get [89 55; 55 34]. Those entries are Fibonacci numbers, which you can explore in the Number Sequence Calculator.
Try each rule on your own matrices. If both sides agree, you can trust that the entries were typed correctly, and if they do not, look for a typo.
The result appears under the buttons with a title that says what was done, for example “A + B” or “Determinant of A”. Fractions are exact by default. Switch to decimals for values rounded to six places. A quick check on any inverse: multiply the matrix by its inverse. If you do not get the identity matrix, there is a typo in one of the entries.
Multiply each row of the first matrix by each column of the second, adding the products. This works only when the number of columns of the first equals the number of rows of the second.
Only when it is square and its determinant is not zero. A matrix with a zero determinant is called singular.
For [a b; c d] it is ad minus bc. For [1 2; 3 4] that is 1 times 4 minus 2 times 3, which is minus 2.
It is the number of linearly independent rows or columns, which is also the number of pivots in the reduced row echelon form.
Yes. Type entries as whole numbers, decimals or fractions like 3/4. The calculator works exactly and can show the answers as fractions or as decimals.
Matrix multiplication is not commutative. Each entry of AB comes from rows of A and columns of B, which gives a different result from rows of B and columns of A.
Sources: Wikipedia: Matrix (mathematics); Wikipedia: Determinant; Wikipedia: Invertible matrix; Wikipedia: Row echelon form
Pick another tool to jump straight to it.