Linear Algebra

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.

Advertisement

📌 Enter Matrices

Matrix A
Matrix B

📊 Result

Enter matrix values and choose an operation
⚠️

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]]:

  1. A + B = [[1+5, 2+6], [3+7, 4+8]] = [[6, 8], [10, 12]]
  2. 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]]
  3. det(A) = 1×4 − 2×3 = 4 − 6 = −2

Frequently Asked Questions

Matrix multiplication combines whole rows and columns rather than pairing up single numbers. Each entry in the result comes from multiplying corresponding elements of a row from the first matrix and a column from the second matrix, then adding those products together — which is why the order you multiply matrices in actually changes the answer.
The determinant is a single number that summarizes certain properties of a matrix, such as whether it can be inverted. For a 2×2 matrix, a determinant of zero means the matrix has no inverse and the rows are linearly dependent — geometrically, it means the transformation the matrix represents collapses space onto a line.
This version is intentionally scoped to 2×2 matrices to keep the interface simple and fast to use. Support for larger matrix sizes is a possible future addition to the tool.
Advertisement