Lab 3.2

Interpretable Linear Transformations

Focus
rotate → project → reflect
Notebook
Ch3-2 Interpretable Linear Transformations.ipynb

Lab goal

Read a transformation matrix as an action on vectors and distinguish what rotation, projection, and reflection preserve or remove.

Lecture-note concepts
  • Linear transformation
  • Images of basis vectors
  • Projection
  • Reflection

Code extensionThe full notebook applies many angles to a point cloud and extends projection to three dimensions.

Key ideas

Terms you will use

Matrix as a mapA[x₁, x₂]ᵀ = x₁a₁ + x₂a₂

The columns of a matrix show where the standard basis vectors move; every other vector follows by linearity.

ProjectionP = uuᵀ for a unit vector u

Projection keeps the component along a chosen subspace and removes the perpendicular component.

ReflectionH = 2P − I

Reflection across span(u) keeps the projected component and reverses the perpendicular component.

Lab 3.2 · Guided example

Watch one vector move three different ways

Random point clouds are replaced by one vector, so each matrix entry can be connected directly to a visible geometric change.

Select a line to see its action, array shape, and concrete operation.

Simplified fromCh3-2 Interpretable Linear Transformations.ipynbThe full source visualizes larger point sets; this example isolates one mechanism at a time.

Line 1: import numpy as np
L01 / 14Choose one vector and angle
Predict

After a 90° counterclockwise turn, which quadrant contains v?

Before

Start with one visible input

The same vector v = [2,1] will make rotation, projection, and reflection directly comparable.

v = 2e₁ + 1e₂
The same vector v = [2,1] will make rotation, projection, and reflection directly comparable.A coordinate-plane view of the vectors, points, and reference lines described above.1 vector or line marks and 0points are shown.
After
?

Reveal to compare.

SOURCE
v.shapenot stored A NumPy 1-D vector.
thetanot stored A 90° angle in radians.

Continue in Python

Run the complete notebook in Colab

Run the original code and change the inputs.