Perform advanced linear algebra operations: addition, subtraction, multiplication, scalar product, transpose, determinant, inverse, trace, matrix power, rank, Hadamard product. Interactive 2x2/3x3/4x4/5x5 grids with instant results.
Matrices are fundamental in mathematics, physics, machine learning, and engineering. Our Matrix Calculator delivers precise operations for 2×2 and 3×3 matrices, including addition, multiplication, transpose, determinant, and inverse. Each computation follows rigorous linear algebra principles verified by academic sources.
For an m×n matrix A = [aij], operations follow standard rules:
(A+B)ij = aij + bij , (A·B)ij = Σk aik bkj , det(A) = Σ (±) a1j C1j .
| Operation | Symbol | Definition | Key Property |
|---|---|---|---|
| Addition | A + B | Element‑wise sum | Commutative, associative |
| Multiplication | A·B | Row‑column dot product | Not commutative, associative |
| Hadamard product | A ∘ B | Element‑wise product | Commutative, used in image processing |
| Determinant | det(A) | Scalar from square matrix | det(AB) = det(A)det(B) |
| Inverse | A−1 | AA−1 = I | Exists iff det(A) ≠ 0 |
| Trace | tr(A) | Sum of diagonal entries | tr(AB) = tr(BA) |
| Rank | rank(A) | Number of independent rows/cols | rank(A) ≤ min(m,n) |
Addition & Subtraction: Elementwise operation – matrices must have identical dimensions. The resulting matrix contains sums/differences of corresponding entries.
Multiplication (A × B): For 2×2 or 3×3, the dot product of rows of A with columns of B yields each entry. Commutativity does not hold in general.
Transpose (Aᵀ): Rows become columns, essential for orthogonal matrices and least‑squares fitting.
Determinant (det A): A scalar representing the matrix’s scaling factor and invertibility. For 2×2: ad−bc. For 3×3: expansion by minors (Sarrus rule). If det = 0, the matrix is singular and has no inverse.
Inverse (A⁻¹): Exists only if det ≠ 0. For 2×2: (1/det)·[[d, -b],[-c, a]]. For 3×3: computed via adjugate matrix divided by determinant. The inverse satisfies A·A⁻¹ = I.
Leontief’s input‑output analysis uses matrix inversion to compute production levels required to meet final demand. Our inverse tool simulates such models.
3D transformations (rotation, scaling) rely on 3×3 matrices. Multiplying transformation matrices combines effects.
Linear regression, PCA, and neural networks heavily depend on matrix transposition, multiplication, and determinants (covariance matrices).