Matrix Calculator
Home/Matrix Calculator
Matrix Calculator
Add, multiply, find inverses, or compute determinants for 1×1 to 4×4 matrices in a snap. Get spot-on results with clear steps.

Matrix Calculator

How to Use the Matrix Calculator

  1. Select an operation: Addition (A + B), Multiplication (A × B), Inverse (A⁻¹), or Determinant (det(A)).
  2. Choose matrix size (1×1 to 4×4) and input values for Matrix A (and B, if needed).
  3. Click "Calculate" for results with step-by-step explanations!

Matrix Operations Explained

1. Addition (A + B)

  • What It Does: Adds two matrices of the same size by adding corresponding elements.
  • How It Works: For matrices A and B of size n×n, the result C is computed as C[i][j] = A[i][j] + B[i][j].
    • Example: For 2×2 matrices, A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]], the result is [[1+5, 2+6], [3+7, 4+8]] = [[6, 8], [10, 12]].
  • Purpose: Used to combine quantities in fields like physics (e.g., adding forces) or economics (e.g., summing budgets).

2. Multiplication (A × B)

  • What It Does: Multiplies two matrices of the same size to produce a new matrix.
  • How It Works: For matrices A and B of size n×n, each element of the result C is the dot product of a row of A and a column of B: C[i][j] = Σ(A[i][k] * B[k][j]) for k from 0 to n-1.
    • Example: For 2×2 matrices, A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]], C[0][0] = 1*5 + 2*7 = 19, C[0][1] = 1*6 + 2*8 = 22, etc., giving [[19, 22], [43, 50]].
  • Purpose: Used in transformations (e.g., rotations in graphics), systems of equations, and machine learning.

3. Inverse (A⁻¹)

  • What It Does: Finds the inverse of a square matrix A, where A * A⁻¹ = I (identity matrix).
  • How It Works: Compute the determinant of A (det(A)). If det(A) ≠ 0, the inverse is A⁻¹ = adj(A) / det(A), where adj(A) is the adjugate (transpose of the cofactor matrix).
    • Example: For A = [[4, 3], [3, 2]] (2×2), det(A) = 42 - 33 = -1. Adjugate is [[2, -3], [-3, 4]]. Inverse is [[2/(-1), -3/(-1)], [-3/(-1), 4/(-1)]] = [[-2, 3], [3, -4]].
  • Purpose: Solves systems of linear equations (e.g., Ax = b → x = A⁻¹b) and reverses transformations.

4. Determinant (det(A))

  • What It Does: Computes a scalar value that describes properties of a square matrix, like invertibility.
  • How It Works:
    • 1×1: det(A) = a11.
    • 2×2: det(A) = a11*a22 - a12*a21.
    • 3×3: Expansion along the first row: det(A) = a11(a22a33 - a23a32) - a12(a21a33 - a23a31) + a13(a21a32 - a22a31).
    • 4×4: Recursive expansion using 3×3 minors along the first row.
    • Example: For A = [[1, 2], [3, 4]], det(A) = 1*4 - 2*3 = -2.
  • Purpose: Determines if a matrix is invertible (det ≠ 0), calculates areas/volumes (e.g., in geometry), and is used in eigenvalues.
Scroll to Top