πŸ”³ Matrix Calculator

Add, multiply, determinant, inverse. 2x2 and 3x3 with steps.

-

Result

How to Use the Matrix Calculator

Choose 2x2 or 3x3, fill in the matrices, pick an operation, and calculate. Determinant, inverse, and transpose use only matrix A; the binary operations use both.

1

Select matrix size and enter the values in grids A and B.

2

Choose the operation: add, subtract, multiply, determinant, inverse, or transpose.

3

Read the result matrix and the step-by-step working underneath.

Matrix Operations Explained

Addition/subtraction: entry by entry; requires identical dimensions. Multiplication: row-by-column dot products; the number of columns of A must equal the number of rows of B. For 2x2 this gives four dot products; for 3x3, nine. Determinant: 2x2 is ad βˆ’ bc; 3x3 expands via cofactors along the first row. Inverse: 2x2 swaps a and d, negates b and c, divides by the determinant; 3x3 uses the adjugate over the determinant. Transpose: flips rows and columns.

Why Determinants Matter

The determinant is zero exactly when the matrix squashes space flat: rows are linearly dependent, and no inverse exists. In equation solving, det = 0 means the system has no unique solution (parallel lines in 2D). In graphics, a negative determinant flips orientation (mirror image). The magnitude tells you the area or volume scaling factor of the transformation.

Worked Example: 2x2 Inverse

A = [[4,7],[2,6]]. Determinant: 4Γ—6 βˆ’ 7Γ—2 = 24 βˆ’ 14 = 10. Swap the diagonal: [[6,7],[2,4]] becomes [[6,βˆ’7],[βˆ’2,4]]. Divide by 10: [[0.6,βˆ’0.7],[βˆ’0.2,0.4]]. Check: A Γ— A⁻¹ = [[1,0],[0,1]], the identity. Try it above with the default values.

Frequently Asked Questions

How do you multiply two matrices?

Multiply rows of the first by columns of the second: entry (i,j) = sum of row i of A times column j of B. The inner dimensions must match: an mΓ—n matrix times an nΓ—p matrix gives mΓ—p. Example: [[1,2],[3,4]] Γ— [[5,6],[7,8]] = [[19,22],[43,50]]. Matrix multiplication is not commutative: AB β‰  BA in general.

When can matrices be added?

Only matrices of the same dimensions can be added or subtracted: add entry by entry. A 2x3 matrix cannot be added to a 3x3 matrix. Scalar multiplication (multiplying every entry by one number) works on any size.

What is a determinant?

A single number summarizing a square matrix. For 2x2 [[a,b],[c,d]] it is ad βˆ’ bc. For 3x3, expand along a row using cofactors. Geometrically it measures area/volume scaling. Critically, a matrix is invertible only if its determinant is nonzero.

How do you find the inverse of a matrix?

For 2x2 [[a,b],[c,d]] with determinant D = adβˆ’bc: inverse = (1/D)[[d,βˆ’b],[βˆ’c,a]]. For 3x3: build the cofactor matrix, transpose it (adjugate), and divide by the determinant. This tool shows each step. If the determinant is zero, no inverse exists.

What are matrices used for?

Everywhere: 3D graphics (rotation/translation transforms), solving systems of equations, Google's PageRank, machine learning (neural network weights are matrices), economics (input-output models), and quantum mechanics. Matrix multiplication is the engine of modern AI.