Matrix Calculator CalculatorScale.com
Linear AlgebraExact Fraction Engine

Matrix Calculator

Perform addition, subtraction, matrix multiplication, determinants, inverses, transposes, powers, and rank calculations with exact rational fractions.

A

Matrix A

Size:×
Matrix A Operations:
B

Matrix B

Size:×
Matrix B Operations:

What is a Matrix in Linear Algebra?

In linear algebra, a matrix is a rectangular array of numbers, symbols, or expressions arranged in horizontal rows and vertical columns.

A = [ a_ij ] = [ a_11 a_12 ... a_1n ; a_21 a_22 ... a_2n ; ... ; a_m1 a_m2 ... a_mn ]

The dimensions of a matrix are written as m × n, where m represents the number of rows and n represents the number of columns. An individual element at row i and column j is denoted as ai,j.

Fundamental Matrix Operations & Rules

1. Matrix Addition & Subtraction (A ± B)

Requires both matrices to have identical dimensions (m_A = m_B and n_A = n_B). Computed by adding or subtracting corresponding elements:

C_ij = A_ij ± B_ij

2. Matrix Multiplication (A × B)

Requires the number of columns in A to match the number of rows in B (n_A = m_B). The product matrix has dimensions m_A × n_B:

c_ij = ∑ (a_ik · b_kj)

⚠️ Non-Commutative: In general, AB ≠ BA.

3. Determinant (|A| or det(A))

A scalar value computed only for square matrices (n × n). For a 2×2 matrix:

det([ a b ; c d ]) = ad - bc

4. Matrix Inverse (A⁻¹)

The matrix satisfying A · A⁻¹ = I. Exists if and only if the matrix is square and det(A) ≠ 0 (non-singular):

A⁻¹ = (1 / det(A)) · adj(A)

Real-World Applications of Matrices

🎮 3D Computer Graphics

3D game engines and shaders use 4×4 transformation matrices to rotate, translate, scale, and project 3D polygonal vertices onto 2D screens.

⚡ Systems of Linear Equations

Engineering circuits, structural load distributions, and economic models formulate large linear systems as Ax = b, solved via matrix inversion or LU decomposition.

🤖 Machine Learning & AI

Artificial neural networks compute forward passes by multiplying input vectors by layer weight matrices: y = σ(W · x + b).

Frequently Asked Questions

Why is matrix multiplication non-commutative (AB ≠ BA)?

Because matrix multiplication represents the composition of linear transformations. The order in which transformations are applied matters (e.g. rotating an object then translating it yields a different position than translating first then rotating).

What does a zero determinant (det = 0) mean?

A matrix with det = 0 is called a singular matrix or degenerate matrix. Geometrically, it collapses space into a lower dimension (e.g. 2D plane into a 1D line), meaning the transformation cannot be reversed, so no inverse matrix exists.

What is the Identity Matrix?

The identity matrix (I) is a square matrix with 1s along the main diagonal and 0s everywhere else. Multiplying any compatible matrix by the identity matrix leaves it unchanged: A · I = A.