Matrix Calculator

Perform operations on matrices up to 5×5

Matrix A

Matrix B

Result Matrix

10.010.010.0
10.010.010.0
10.010.010.0

Matrix Values

Result Matrix

RowColumnValue
1110.0000
1210.0000
1310.0000
2110.0000
2210.0000
2310.0000
3110.0000
3210.0000
3310.0000

Understanding Matrix Operations

What Is a Matrix?

A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are denoted by capital letters and are fundamental in linear algebra, computer graphics, data science, and engineering.

Matrix Addition and Subtraction

Two matrices can be added or subtracted only if they have the same dimensions. Each element in the result is the sum or difference of the corresponding elements. For example, if C = A + B, then cᵢⱼ = aᵢⱼ + bᵢⱼ for all valid i, j.

Matrix Multiplication

Matrix multiplication is not element-wise. The product AB exists only when the number of columns in A equals the number of rows in B. Each element cᵢⱼ of the result is the dot product of row i of A with column j of B. Matrix multiplication is not commutative: AB ≠ BA in general.

Transpose

The transpose of a matrix A, denoted Aᵀ, is obtained by swapping rows and columns. The element at position (i,j) moves to position (j,i). The transpose has important properties: (AB)ᵀ = BᵀAᵀ and (Aᵀ)ᵀ = A.

Applications

Matrices are used in computer graphics (transformations, projections), machine learning (neural network weights), physics (quantum mechanics, stress tensors), economics (input-output models), and cryptography. They are the computational backbone of modern technology.

Practical Example

Matrix A = [[1,2,3],[4,5,6],[7,8,9]] and B = [[9,8,7],[6,5,4],[3,2,1]]. Adding: C = A + B = [[10,10,10],[10,10,10],[10,10,10]].

Multiplying: C[1,1] = 1×9 + 2×6 + 3×3 = 9+12+9 = 30. The full product yields a matrix where each element is computed as the dot product of the corresponding row and column.

Perguntas Frequentes

Can you multiply any two matrices?

No. Matrix multiplication AB requires that the number of columns in A equals the number of rows in B. A 2×3 matrix can multiply a 3×4 matrix, resulting in a 2×4 matrix.

Is matrix multiplication commutative?

No. In general, AB ≠ BA. Even when both products exist, they typically give different results. This is a key difference from scalar multiplication.

What is a square matrix?

A square matrix has the same number of rows and columns (n×n). Square matrices have special properties: they can have determinants, inverses, and eigenvalues.

What is the identity matrix?

The identity matrix I has 1s on the main diagonal and 0s everywhere else. Multiplying any matrix A by I gives A itself: AI = IA = A.

How are matrices used in computer graphics?

Matrices represent transformations like rotation, scaling, and translation. A 3D point can be transformed by multiplying its coordinate vector by a transformation matrix. GPUs perform billions of matrix operations per second.

Disclaimer: This matrix calculator is for educational purposes. Verify critical calculations independently.

References

  1. Wikipedia. "Matrix (mathematics)." en.wikipedia.org
  2. Khan Academy. "Matrices." khanacademy.org
  3. MIT OpenCourseWare. "Linear Algebra." ocw.mit.edu
  4. Wolfram MathWorld. "Matrix." mathworld.wolfram.com
  5. Brilliant. "Matrix Operations." brilliant.org

Comentários