iLabs Shunya

Shunya / Matrices & Transformations Lab

Shunya · Maths lab

Matrices & transformations lab

See what a matrix actually does. Drag the two columns of a 2 × 2 matrix and watch the whole plane stretch, turn and flip, chain two transformations together, then multiply matrices entry by entry, expand determinants, find inverses and solve systems of equations by row reduction, the matrix method and Cramer's rule.

The maths behind it

What each mode covers

Transformations — drag the columns of a 2 × 2 matrix and watch a shape, the grid and the unit square change. Determinant as area scale factor, inverse, eigenvector directions and P′ = MP. An extension beyond the class 12 syllabus that explains why the rules work.
Composition — do one transformation and then another (rotate, stretch, shear, reflect, project) and see the single matrix BA that does both, and how the answer changes with the order.
Arithmetic — add, subtract, scale, multiply and transpose matrices up to 3 × 3, with exact fractions and every entry's row · column working. Class 12 matrices.
Determinant & inverse — expand along any row or column, cofactors, adjoint, inverse, and the effect of row operations on the determinant. Class 12 determinants.
Linear systems — the same system solved by row reduction (step by step), the matrix method X = A⁻¹B and Cramer's rule, with the consistency test using rank. Class 12 matrices and determinants.

Part of Shunya. See the syllabus map for the chapters these modes map to. All matrix arithmetic here is exact (fractions), so answers such as 1/3 are not rounded. The plane transformations use decimals.

Formulas used in this lab

Matrices: order and types Class 12

Order of a matrix
m×nm \times n
Identity matrix
AI=IA=AAI = IA = A
Symmetric
AT=AA^T = A
Skew-symmetric
AT=AA^T = -A

Matrix arithmetic Class 12

Sum (same order)
(A+B)ij=aij+bij(A + B)_{ij} = a_{ij} + b_{ij}
Scalar multiple
(kA)ij=kaij(kA)_{ij} = k\,a_{ij}
Product entry
(AB)ij=kaikbkj(AB)_{ij} = \sum_k a_{ik}b_{kj}
Order of a product
(m×n)(n×p)=m×p(m \times n)(n \times p) = m \times p
Not commutative
ABBA in generalAB \ne BA \text{ in general}

Transpose Class 12

Definition
(AT)ij=aji(A^T)_{ij} = a_{ji}
Rules
(AT)T=A,(A+B)T=AT+BT(A^T)^T = A,\qquad (A + B)^T = A^T + B^T
Transpose of a product
(AB)T=BTAT(AB)^T = B^TA^T
Transpose of a scalar multiple
(kA)T=kAT(kA)^T = kA^T

Determinant Class 12

2 × 2
abcd=adbc\begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc
Expansion along row i
detA=jaijCij\det A = \sum_j a_{ij}C_{ij}
Cofactor
Cij=(1)i+jMijC_{ij} = (-1)^{i+j} M_{ij}
Product rule
det(AB)=detAdetB\det(AB) = \det A \cdot \det B
Scalar multiple (n × n)
det(kA)=kndetA\det(kA) = k^n \det A
Transpose
det(AT)=detA\det(A^T) = \det A

Row operations and the determinant Class 12

Swap two rows
detdet\det \to -\det
Multiply a row by k
detkdet\det \to k\det
Add a multiple of a row to another
det unchanged\det \text{ unchanged}
Two equal rows, or a row of zeros
det=0\det = 0

Adjoint and inverse Class 12

Adjoint
adjA=(Cij)T\operatorname{adj} A = (C_{ij})^T
Key identity
A(adjA)=(detA)IA\,(\operatorname{adj} A) = (\det A)\,I
Inverse
A1=adjAdetA,detA0A^{-1} = \dfrac{\operatorname{adj} A}{\det A},\qquad \det A \ne 0
2 × 2 inverse
1adbc(dbca)\dfrac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}
Inverse of a product
(AB)1=B1A1(AB)^{-1} = B^{-1}A^{-1}

Solving linear systems Class 12

Matrix form
AX=BAX = B
Matrix method (det A ≠ 0)
X=A1BX = A^{-1}B
Cramer's rule
x=DxD,y=DyD,z=DzDx = \dfrac{D_x}{D},\quad y = \dfrac{D_y}{D},\quad z = \dfrac{D_z}{D}
One solution
rank A=rank [AB]=n\text{rank } A = \text{rank } [A|B] = n
No solution
rank A<rank [AB]\text{rank } A \lt \text{rank } [A|B]
Infinitely many
rank A=rank [AB]<n\text{rank } A = \text{rank } [A|B] \lt n

Matrices as transformations (beyond the core syllabus) Class 12

Image of a point
(xy)=(abcd)(xy)\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix}
Rotation by θ
(cosθsinθsinθcosθ)\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}
Area scale factor
detM|\det M|
Eigenvalues
λ2(trM)λ+detM=0\lambda^2 - (\operatorname{tr} M)\lambda + \det M = 0
Composition (B after A)
M=BAM = BA