Matrix

Matrix Calculator

Work with matrices up to 3x3 for various mathematical operations.

Matrix A

Matrix B

Understanding Matrix Operations

A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are fundamental to linear algebra and have applications in computer graphics (transformations and rotations), physics (quantum mechanics, stress tensors), data science (machine learning weight matrices), and engineering (solving systems of simultaneous equations). TheCalcPro's matrix calculator supports addition, subtraction, multiplication, determinant calculation, and matrix inverse for 2×2 and 3×3 matrices.

Key Formulas

For a 2×2 matrix A = [[a, b], [c, d]]:

Determinant: det(A) = ad − bc

Inverse: A⁻¹ = (1/det(A)) × [[d, −b], [−c, a]]

The determinant (ad − bc) must be non-zero for the inverse to exist. For 3×3 matrices, the determinant is computed by cofactor expansion (Laplace expansion), and the inverse uses the adjugate matrix divided by the determinant.

Step-by-Step Example: 2×2 Matrix Multiplication

Multiply A = [[1, 2], [3, 4]] by B = [[5, 6], [7, 8]]:

  1. Element (1,1): (1×5) + (2×7) = 5 + 14 = 19
  2. Element (1,2): (1×6) + (2×8) = 6 + 16 = 22
  3. Element (2,1): (3×5) + (4×7) = 15 + 28 = 43
  4. Element (2,2): (3×6) + (4×8) = 18 + 32 = 50

Result: A × B = [[19, 22], [43, 50]]. Each element in the product is the dot product of the corresponding row from A and column from B. Note that B × A would produce a different result, [[23, 34], [31, 46]], demonstrating that matrix multiplication is not commutative.

Applications

Matrices are used to solve systems of linear equations (Ax = b), perform geometric transformations (rotation, scaling, translation) in 2D and 3D graphics, represent Markov chains in probability, and train neural networks in machine learning. For equation solving, visit our Equation Solver. For statistical analysis, try the Statistics Engine.

Matrix Calculator FAQ

The determinant is a scalar value that encodes several important properties of a square matrix. If the determinant is zero, the matrix is "singular" — it has no inverse, and the corresponding system of linear equations has either no solution or infinitely many solutions. If the determinant is non-zero, the matrix is invertible. Geometrically, the absolute value of the determinant represents the scaling factor of the linear transformation described by the matrix.

A singular matrix is a square matrix whose determinant equals zero. This means the matrix cannot be inverted, and any system of equations represented by it is either inconsistent (no solutions) or dependent (infinitely many solutions). Singular matrices map at least one non-zero vector to the zero vector, collapsing a dimension in the transformation.

Yes. Matrix multiplication is not commutative — in general, A × B ≠ B × A. Furthermore, the multiplication A × B is only defined when the number of columns in A equals the number of rows in B. The result has the same number of rows as A and the same number of columns as B. Always verify the dimensions before multiplying.

The identity matrix (I) is a square matrix with 1s on the main diagonal and 0s everywhere else. It acts as the multiplicative identity for matrices: A × I = I × A = A for any compatible square matrix A. It is the matrix equivalent of the number 1 in scalar arithmetic and is used in solving systems of equations and computing inverses.