Skip to main content
Calcimator

Matrix Calculator

Perform matrix operations: addition, subtraction, multiplication, determinant, and transpose for 2x2 matrices.

This calculator performs one of five 2×2 matrix operations — Addition, Subtraction, Multiplication, Determinant, or Transpose — selected by the Operation dropdown (lines 25-52), computing only the operation you've chosen. At the default Addition operation, each result cell is a simple sum of the matching cells from Matrix A and Matrix B — Result [1,1] = a11 + b11 (line 27) — so Matrix B's element shows a larger measured sensitivity than Matrix A's matching cell, purely because Matrix B's default values (5-8) are larger numbers than Matrix A's (1-4); the addition formula itself weighs both cells identically. Determinant of A is only actually computed when Operation is set to 4 (lines 43-45) — at every other Operation setting, including the default Addition, it stays fixed at its initialized value of 0 (line 22) regardless of what any of the eight matrix elements are set to, which can read as "this matrix has a zero determinant" when really the calculator simply hasn't computed it. Trace, unlike the other outputs, is computed unconditionally regardless of Operation (line 55) and depends only on a11 and a22 — Matrix B's four elements never affect it at all. This calculator does not support matrices larger than 2×2, and it does not compute a matrix inverse as an output — the How to Use notes describe the formula for one, but no inverse value ever appears among the calculator's actual results.

Inputs

Results

Result [1,1]

6

Result [1,2]8
Result [2,1]10
Result [2,2]12
Determinant of A0
Trace of A5
How to Use This Calculator
  1. Enter the four elements of Matrix A (a11, a12, a21, a22) and Matrix B row by row.
  2. Select the operation: addition, subtraction, and multiplication follow standard linear algebra rules.
  3. Determinant of a 2×2 matrix: det(A) = a11×a22 − a12×a21; a non-zero determinant means the matrix is invertible.
  4. Transpose swaps rows and columns; Trace is the sum of diagonal elements (a11 + a22).
  5. The inverse A⁻¹ is computed when det(A) ≠ 0: A⁻¹ = (1/det) × [[a22, -a12], [-a21, a11]].
  6. Matrix multiplication is not commutative — A×B and B×A generally give different results.

How the result changes with Matrix B [1,1]

Matrix B [1,1]Result [1,1]
23
78
1314
1819

What each input means

Operation
Select the matrix operation. Determinant and transpose use only Matrix A.
Matrix A [1,1]
Top-left element of Matrix A
Matrix A [1,2]
Top-right element of Matrix A
Matrix A [2,1]
Bottom-left element of Matrix A
Matrix A [2,2]
Bottom-right element of Matrix A
Matrix B [1,1]
Top-left element of Matrix B (for addition/subtraction/multiplication)
Matrix B [1,2]
Top-right element of Matrix B
Matrix B [2,1]
Bottom-left element of Matrix B
Matrix B [2,2]
Bottom-right element of Matrix B

How this is calculated

Formula

For 2x2 matrices: det(A) = a₁₁a₂₂ - a₁₂a₂₁

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Operation = 1, Matrix A [1,1] = 1, Matrix A [1,2] = 2, Matrix A [2,1] = 3 = 9 input(s) provided
  2. Calculate Result [1,1]
    Result [1,1]
    6 = 6
  3. Calculate Result [1,2]
    Result [1,2]
    8 = 8
  4. Calculate Result [2,1]
    Result [2,1]
    10 = 10

Engine last updated . Checked against 3 independently-derived tests how we verify calculators.

Frequently Asked Questions

Why is Determinant of A showing 0 when my Matrix A clearly doesn't have a zero determinant?

Determinant of A is only actually calculated when the Operation dropdown is set to "Determinant of A" (lines 43-45) — at any other Operation, including the default Addition, the value stays at its initialized 0 (line 22) no matter what Matrix A's four elements are, since the calculation never runs.

Does Matrix B's [1,1] element affect Result [1,1] more than Matrix A's [1,1] does?

It shows a bigger measured effect, but not because the Addition formula treats them differently — Result [1,1] is the simple sum a11 + b11 (line 27), which weighs both cells equally. Matrix B's default value of 5 is just a larger number than Matrix A's default of 1, so an equal proportional nudge produces a bigger absolute change.

Does Trace depend on any of Matrix B's elements?

No. Trace is computed unconditionally as a11 + a22 (line 55), regardless of which Operation you've selected — none of Matrix B's four elements, nor Matrix A's off-diagonal a12 and a21, ever enter that formula.

Can this calculator show me the inverse of Matrix A?

Not as an output. The How to Use notes describe how an inverse would be derived from the determinant, but the calculator's output list only includes Result [1,1] through [2,2], Determinant of A, and Trace of A — no inverse value is actually computed or displayed anywhere on the page.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.