All Labs

Matrix, Vector & Transformations Lab

Build intuition for linear algebra by computing matrix operations step by step, visualizing how 2D transformations deform the unit square, and exploring vector arithmetic with interactive diagrams. Record results, compare eigenvalues and determinants, and discover the geometry behind the algebra.

Guided Experiment: Transformation Gallery

How do rotation, reflection, scaling, and shear transformations visually deform the unit square? Predict what each transformation does to the shape and orientation.

Write your hypothesis in the Lab Report panel, then click Next.

Controls

Results

A × B

[1234][5678]=[19224350]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \cdot \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} = \begin{bmatrix} 19 & 22 \\ 43 & 50 \end{bmatrix}

Result Matrix

1922
4350

Step-by-Step

  1. C_{ij} = sum of A row i times B column j
  2. C_{11} = (1)(5) + (2)(7) = 19
  3. C_{12} = (1)(6) + (2)(8) = 22
  4. C_{21} = (3)(5) + (4)(7) = 43
  5. C_{22} = (3)(6) + (4)(8) = 50

Data Table

(0 rows)
#OperationInputResultDeterminantEigenvaluesNotes
0 / 500
0 / 500
0 / 500

Reference Guide

Matrix Multiplication

To multiply two matrices A and B, each entry of the product C is the dot product of a row of A with a column of B.

Cij=kAikBkjC_{ij} = \sum_{k} A_{ik} \cdot B_{kj}

Matrix multiplication is not commutative. In general, AB does not equal BA. The number of columns in A must equal the number of rows in B.

Linear Transformations

A 2\u00D72 matrix defines a linear transformation of the plane. The columns of the matrix tell you where the basis vectors land.

T(v)=Av=[abcd][xy]T(\mathbf{v}) = A\mathbf{v} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix}

Rotations, reflections, scalings, and shears are all linear transformations. Composing transformations corresponds to multiplying their matrices.

Determinant and Area

The determinant of a 2\u00D72 matrix measures how much the transformation scales areas. Its sign indicates whether orientation is preserved or reversed.

det[abcd]=adbc\det\begin{bmatrix} a & b \\ c & d \end{bmatrix} = ad - bc

If det(A) = 0, the transformation collapses the plane onto a line or point. If det(A) = 1, the transformation preserves area (e.g., rotations and shears).

Vector Operations

Vectors can be added, subtracted, and scaled. The dot product measures alignment, and the cross product (3D) gives a perpendicular vector.

projb(a)=abbbb\text{proj}_{\mathbf{b}}(\mathbf{a}) = \frac{\mathbf{a} \cdot \mathbf{b}}{\mathbf{b} \cdot \mathbf{b}}\,\mathbf{b}

The angle between two vectors is found from the dot product. Two vectors are linearly independent when neither is a scalar multiple of the other.