๐Ÿ”ข Matrix Calculator

A
B
0000

Enter two 2ร—2 or 3ร—3 matrices and calculate their sum, difference, or product, or find the determinant of matrix A. Useful for checking linear algebra homework or verifying matrix calculations.

How to use

  1. Choose the matrix size (2ร—2 or 3ร—3).
  2. Enter values into each cell of matrix A (and matrix B, unless computing the determinant).
  3. Choose an operation (A+B, Aโˆ’B, Aร—B, or det(A)) โ€” the result is calculated automatically.

How the calculation works

This tool adds, subtracts and multiplies 2ร—2 or 3ร—3 matrices and calculates determinants. Add / subtract: combine the elements in the same positions Multiply: row i, column j of the result = the sum of the products of row i of A with column j of B Matrix multiplication generally depends on order (AB โ‰  BA). Determinant 2ร—2: |a b; c d| = ad โˆ’ bc 3ร—3: calculated by cofactor expansion along the first row A matrix with determinant 0 has no inverse; the transformation it represents flattens shapes (area or volume becomes 0).

Worked example

A = [[1, 2], [3, 4]], B = [[5, 6], [7, 8]] A ร— B = [[1ร—5+2ร—7, 1ร—6+2ร—8], [3ร—5+4ร—7, 3ร—6+4ร—8]] = [[19, 22], [43, 50]] det(A) = 1 ร— 4 โˆ’ 2 ร— 3 = โˆ’2 A 3ร—3 determinant [[2, 0, 1], [1, 3, 2], [1, 1, 2]] = 2 ร— (3ร—2 โˆ’ 2ร—1) โˆ’ 0 ร— (1ร—2 โˆ’ 2ร—1) + 1 ร— (1ร—1 โˆ’ 3ร—1) = 8 โˆ’ 0 โˆ’ 2 = 6

Things to be aware of

  • The determinant is the (signed) area of a parallelogram for 2ร—2 and the volume of a parallelepiped for 3ร—3.
  • For a system of linear equations written as a matrix, a non-zero coefficient determinant means exactly one solution.
  • With decimals, floating-point error can leave a tiny number where the exact answer is 0.

FAQ

What is a determinant?

It's a single number computed from a square matrix that captures certain properties of it. A determinant of 0 means the matrix has no inverse (it's singular).

Does this support 4ร—4 or larger matrices?

No, the current version only supports 2ร—2 and 3ร—3 matrices.

Does this calculate the inverse of a matrix?

No, the current version only supports addition, subtraction, multiplication, and the determinant.