Add, subtract, multiply 2×2 and 3×3 matrices, and find determinant and transpose.
Reviewed by the CalculatorKosh Editorial TeamUpdated June 2026Free · No sign-up
Matrix Calculator
Add, subtract, multiply 2×2 and 3×3 matrices, and find determinant and transpose.
2×2 matrices only. Each matrix has 4 inputs arranged in a 2×2 grid (top-left, top-right, bottom-left, bottom-right).
det(A) = 1
det(B) = 1
How It Works
A matrix is a rectangular array of numbers arranged in rows and columns. This calculator works with 2×2 matrices and performs the three operations you meet most often in early linear algebra: addition, subtraction, and multiplication. Alongside the result it also reports the determinant of each input matrix and the trace of Matrix A, so you can check several properties at once. It is built for school and college students working through algebra homework, engineers and data-science learners revising the rules before a heavier computation, and anyone who wants to verify a hand calculation quickly without reaching for a spreadsheet.
Matrices are not just an academic exercise. They power 3D transformations in computer graphics and games, the weight layers inside neural networks, the solution of simultaneous equations in engineering, and the state transitions in physics and economics. Getting comfortable with the 2×2 case is the gateway to all of that, because every larger matrix obeys the same rules — there are just more numbers to track.
How the operations work
Addition and subtraction are done element by element. You add (or subtract) the numbers that sit in the same position in each matrix, so (A ± B)ᵢⱼ = Aᵢⱼ ± Bᵢⱼ. This only makes sense when both matrices are the same size, which is always true here because both inputs are 2×2.
Multiplication is the rule that trips most people up, because it is not element-wise. The entry in row i, column j of the product is the dot product of row i of A with column j of B: (AB)ᵢⱼ = Σₖ Aᵢₖ × Bₖⱼ. For a valid product the number of columns in the first matrix must equal the number of rows in the second; with two square 2×2 matrices that condition is always satisfied, so multiplication always works here.
The determinant of a 2×2 matrix [[a, b], [c, d]] is det = ad − bc. It tells you whether the matrix can be inverted: a non-zero determinant means an inverse exists, while a determinant of zero means the matrix is singular and has no inverse. Geometrically the determinant is the factor by which the matrix scales area. The trace is simply the sum of the diagonal entries, a + d.
Worked example
Multiply A = [[1, 2], [3, 4]] by B = [[5, 6], [7, 8]]. The top-left entry is row 1 of A dotted with column 1 of B: 1×5 + 2×7 = 19. The top-right is 1×6 + 2×8 = 22. The bottom-left is 3×5 + 4×7 = 43, and the bottom-right is 3×6 + 4×8 = 50. So AB = [[19, 22], [43, 50]]. If you instead add the two matrices, you work position by position: 1+5, 2+6, 3+7 and 4+8, giving A + B = [[6, 8], [10, 12]]. The determinant of A is 1×4 − 2×3 = −2, its trace is 1 + 4 = 5, and the determinant of B is 5×8 − 6×7 = −2 as well.
Tips and common mistakes
Remember that matrix multiplication is not commutative: in general A×B ≠ B×A, so the order you enter the matrices matters. It is, however, associative and distributive, and the identity matrix [[1, 0], [0, 1]] leaves any matrix unchanged when multiplied. The most frequent error is treating multiplication as element-wise (multiplying matching positions) instead of using the row-by-column dot product — that gives the Hadamard product, which is a different operation entirely. A second common slip is forgetting the sign in the determinant: it is ad minus bc, not ad + bc. Finally, decimals and negative numbers are fully supported, so you can enter values like −1.5 directly; results are rounded to four decimal places for readability.
Frequently Asked Questions
Matrix addition adds corresponding elements from two matrices of the same dimensions. For 2×2 matrices A and B: (A+B)ᵢⱼ = Aᵢⱼ + Bᵢⱼ. The result is also a 2×2 matrix. Both matrices must have identical dimensions — you cannot add matrices of different sizes.
Part of Math Tools & Converters — compare every related calculator in one place.