2×2 and 3×3 Matrix Calculator

Add, subtract, multiply, transpose or invert 2×2 and 3×3 matrices, and calculate determinants.

A
B
Result
—
—
—
—
—
—
—
—
—
Determinant of A
—
Determinant of B
—
Invertibility of A
—

Entries are indexed by row and column. Binary operations require both matrices of the selected size; unary operations ignore B. Determinants and singularity are computed from exact entered rationals, without a floating-point zero threshold. Singular inverse mode shows the determinant and status, with no inverse entries. Results display up to 12 significant digits; intermediate rational values are limited to 512 bits. An ill-conditioned inverse may be very sensitive to input uncertainty.

2×2 and 3×3 Matrix Calculator

Matrix addition and subtraction combine corresponding elements directly: each entry in the result is the sum (or difference) of the matching entries in A and B. Matrix multiplication works differently — each entry in the result is a sum of products, following the row-times-column rule.

The determinant of a 2x2 matrix [a b; c d] is calculated as ad − bc. It's a single number that captures important properties of the matrix, including whether it can be inverted (a matrix with determinant 0 has no inverse).

Entries are indexed by row and column. Binary operations require both matrices of the selected size; unary operations ignore B. Determinants and singularity are computed from exact entered rationals, without a floating-point zero threshold. Singular inverse mode shows the determinant and status, with no inverse entries. Results display up to 12 significant digits; intermediate rational values are limited to 512 bits. An ill-conditioned inverse may be very sensitive to input uncertainty.

Frequently asked questions

Can you add matrices of different sizes?

No — matrix addition and subtraction require both matrices to have the same dimensions, since each operation combines corresponding positions.

Is matrix multiplication the same as multiplying each element?

No — unlike addition, matrix multiplication uses the row-times-column rule, where each output entry is a sum of products across a row of the first matrix and a column of the second.

What does a determinant of zero mean?

A is singular: no inverse

How we verified this calculator

The calculator is checked against 6 reference cases computed independently of its code. Last passed: .

# Inputs Expected result
1
Matrix size = 2×2
Operation = A + B
A[1] = 1
A[2] = 0
A[3] = 0
A[4] = 1
A[5] = bad
A[6] = bad
A[7] = bad
A[8] = bad
A[9] = bad
B[1] = -4
B[2] = -3
B[3] = 3
B[4] = -3
B[5] = bad
B[6] = bad
B[7] = bad
B[8] = bad
B[9] = bad
Determinant of A: 1
Determinant of B: 21
2
Matrix size = 2×2
Operation = A − B
A[1] = 1
A[2] = 0
A[3] = 0
A[4] = 1
A[5] = bad
A[6] = bad
A[7] = bad
A[8] = bad
A[9] = bad
B[1] = -4
B[2] = -3
B[3] = 3
B[4] = -3
B[5] = bad
B[6] = bad
B[7] = bad
B[8] = bad
B[9] = bad
Determinant of A: 1
Determinant of B: 21
3
Matrix size = 2×2
Operation = A × B
A[1] = 1
A[2] = 0
A[3] = 0
A[4] = 1
A[5] = bad
A[6] = bad
A[7] = bad
A[8] = bad
A[9] = bad
B[1] = -4
B[2] = -3
B[3] = 3
B[4] = -3
B[5] = bad
B[6] = bad
B[7] = bad
B[8] = bad
B[9] = bad
Determinant of A: 1
Determinant of B: 21
4
Matrix size = 2×2
Operation = Transpose A
A[1] = 1
A[2] = 0
A[3] = 0
A[4] = 1
A[5] = bad
A[6] = bad
A[7] = bad
A[8] = bad
A[9] = bad
B[1] = bad
B[2] = bad
B[3] = bad
B[4] = bad
B[5] = bad
B[6] = bad
B[7] = bad
B[8] = bad
B[9] = bad
Determinant of A: 1
5
Matrix size = 2×2
Operation = Determinant of A
A[1] = 1
A[2] = 0
A[3] = 0
A[4] = 1
A[5] = bad
A[6] = bad
A[7] = bad
A[8] = bad
A[9] = bad
B[1] = bad
B[2] = bad
B[3] = bad
B[4] = bad
B[5] = bad
B[6] = bad
B[7] = bad
B[8] = bad
B[9] = bad
Determinant of A: 1
6
Matrix size = 2×2
Operation = Inverse of A
A[1] = 1
A[2] = 0
A[3] = 0
A[4] = 1
A[5] = bad
A[6] = bad
A[7] = bad
A[8] = bad
A[9] = bad
B[1] = bad
B[2] = bad
B[3] = bad
B[4] = bad
B[5] = bad
B[6] = bad
B[7] = bad
B[8] = bad
B[9] = bad
Determinant of A: 1

How we test our calculators →

Also try:

Back to category →