Matrix Calculator — 2×2 Matrix Operations
Add, subtract, or multiply two 2×2 matrices, or find the determinant and transpose of a single matrix. This version supports 2×2 matrices only — larger sizes are a possible future addition.
📌 Enter Matrices
📊 Result
Disclaimer: This tool performs standard mathematical calculations for educational and reference purposes. Always double-check results independently for graded coursework, exams, or safety-critical applications.
How 2×2 Matrix Operations Work
A matrix is simply a rectangular grid of numbers. A 2×2 matrix has two rows and two columns, giving four entries total. Different operations combine or transform those entries in specific, well-defined ways.
The Formulas
Addition/Subtraction: combine matrices entry by entry — the value in each position of the result comes from adding or subtracting the matching positions in A and B. Multiplication: each entry in the result is the sum of products between a row of A and a column of B — result[i][j] = (row i of A) · (column j of B). Determinant: for matrix A = [[a,b],[c,d]], det(A) = a×d − b×c. Transpose: flips the matrix over its diagonal, turning rows into columns.
Worked Example
Given A = [[1,2],[3,4]] and B = [[5,6],[7,8]]:
- A + B = [[1+5, 2+6], [3+7, 4+8]] = [[6, 8], [10, 12]]
- A × B: top-left = (1×5 + 2×7) = 19, top-right = (1×6 + 2×8) = 22, bottom-left = (3×5 + 4×7) = 43, bottom-right = (3×6 + 4×8) = 50 → [[19, 22], [43, 50]]
- det(A) = 1×4 − 2×3 = 4 − 6 = −2