Add, subtract, multiply two 2x2 matrices, and find their determinants.
A matrix is a rectangular grid of numbers arranged in rows and columns, used widely in math, physics, computer graphics and engineering. A 2x2 matrix has 2 rows and 2 columns, with entries usually written as a, b, c, d.
Addition/Subtraction: add or subtract each matching position.
Multiplication: [a b; c d] × [e f; g h] = [ae+bg, af+bh; ce+dg, cf+dh]
Determinant: det(A) = a×d - b×c
For A = [1 2; 3 4] and B = [5 6; 7 8], A × B = [(1×5+2×7) (1×6+2×8); (3×5+4×7) (3×6+4×8)] = [19 22; 43 50].
Addition, subtraction, multiplication, determinant, and inverse.
For [[a,b],[c,d]], determinant = (a×d) − (b×c).
The inverse formula divides by the determinant, so zero makes it undefined.