Matrix Calculator

Perform matrix operations: addition, subtraction, scalar multiplication, and matrix multiplication for 2×2 and 3×3 matrices. Find transpose and trace of a matrix.

∑ Linear Algebra📐 C = A × B (matrix multiplication)🔢 Math
Operation
A row 1: a₁₁
a₁₂
A row 2: a₂₁
a₂₂
B row 1 / scalar k: b₁₁
b₁₂
B row 2: b₂₁
b₂₂
Please enter valid values.

Formula & Reference

VariableSymbolFormulaUnits
Matrix CalculatorC = A × B (matrix multiplication)matrix

Step-by-Step Examples

Example 1
Matrix Multiplication

A=[[1,2],[3,4]] × B=[[5,6],[7,8]].

  • C₁₁=1×5+2×7=19
  • C₁₂=1×6+2×8=22
  • C₂₁=3×5+4×7=43
  • C₂₂=3×6+4×8=50
  • Result: [[19,22],[43,50]]
✓ [[19,22],[43,50]]
Example 2
Addition

[[1,2],[3,4]] + [[5,6],[7,8]].

  • Add element-wise
  • [[6,8],[10,12]]
✓ [[6,8],[10,12]]
Example 3
Transpose

Transpose [[1,2],[3,4]].

  • Rows become columns
  • [[1,3],[2,4]]
  • Trace stays same: 1+4=5
✓ [[1,3],[2,4]]

Real-World Applications

Common Mistakes to Avoid

⚠️
Matrix multiplication is not commutative

AB ≠ BA in general. Always multiply in the correct order.

⚠️
Dimension mismatch

A×B requires A's columns = B's rows. (m×n)(n×p) = (m×p). Mismatched dimensions: undefined.

⚠️
Addition requires same dimensions

You can only add matrices of exactly the same size.

Frequently Asked Questions

What is a matrix?
A rectangular array of numbers arranged in rows and columns. Used to represent linear transformations, systems of equations, and data.
Why is matrix multiplication done that way?
Each element cᵢⱼ = dot product of row i of A with column j of B. This corresponds to composing linear transformations.
What is the identity matrix?
The matrix I where AI = IA = A. For 2×2: [[1,0],[0,1]]. It is the matrix equivalent of the number 1.
What is the trace?
Sum of diagonal elements. Trace(A) = a₁₁ + a₂₂ + ... Equals the sum of eigenvalues.
What is a rotation matrix?
[[cos θ, −sin θ],[sin θ, cos θ]] rotates vectors by angle θ counterclockwise. Widely used in graphics and robotics.

Related Math Calculators

Formula Explorer connections

Interpretation: This relationship represents vectors, linear systems or transformations using matrix structure and vector operations. Assumption: Matrix dimensions must be compatible. Inversion, decomposition and unique solutions require rank, conditioning or nonzero-determinant conditions.

Matrix Condition Number Calculator →Matrix Inverse Calculator →Null Space and Column Space Calculator →Math Formula Explorer →