Three-Dimensional Linear Transformations

Essence of Linear Algebra · Chapter 5 🔗 https://youtu.be/rHLEWRxRGiM


🧠 Big Idea

Everything from 2D linear transformations carries over directly to 3D. Instead of 2 basis vectors and a 2×2 matrix, you now track 3 basis vectors and use a 3×3 matrix — but the core logic (track where basis vectors land, everything else follows) is identical.


📐 Three Basis Vectors

In 3D there are three special unit vectors:

VectorDirection
îx-direction
ĵy-direction
z-direction

A 3D linear transformation is fully determined by tracking where these three vectors land.


🔢 The 3×3 Matrix

Record where î, ĵ, and k̂ land as the three columns of a 3×3 matrix:

| a  b  c |      ↑   ↑   ↑
| d  e  f |      î   ĵ   k̂  land here
| g  h  i |

9 numbers completely describe any 3D linear transformation (compare: 4 numbers for 2D).

Matrix-vector multiplication (same logic as 2D)

For input vector [x, y, z]:

result = x·(column 1) + y·(column 2) + z·(column 3)

Just like 2D: each coordinate scales its corresponding basis vector's destination, then you add the three scaled vectors together.


🎯 Worked Example: 90° Rotation Around the Y-Axis

Basis vectorLands at
î[0, 0, -1]
ĵ[0, 1, 0] (unchanged — it's the rotation axis)
[1, 0, 0]

Matrix:

| 0  0  1 |
| 0  1  0 |
| -1 0  0 |

Pattern to remember: whichever basis vector lies on the rotation axis stays fixed; the other two basis vectors swap/rotate into each other's territory.


✖️ Combining 3D Transformations

Multiplying two 3×3 matrices works exactly like the 2D case:

M₂ · M₁  =  "apply M₁ first, then M₂"

Same right-to-left reading convention. Same logic: track where each basis vector ends up after both transformations, use those as the columns of the product matrix.

3D matrix multiplication is hugely important in computer graphics and robotics — composing rotations becomes much easier mentally when broken into a chain of simpler transformations rather than one complex one.


🧩 Puzzle to Ponder (from the video)

Linear transformations can also go between dimensions:

  • 2D → 3D transformation: matrix has 3 rows, 2 columns
  • 3D → 2D transformation: matrix has 2 rows, 3 columns

Rule of thumb: columns = dimension of input space, rows = dimension of output space.

Multiplying such matrices is meaningful only when the output dimension of the right matrix matches the input dimension of the left matrix — otherwise the composition doesn't make sense (you can't feed a 2D output into a function expecting 3D input, etc).


💡 Key Takeaways

  • 3D transformations are determined by where î, ĵ, k̂ land — exactly like 2D's î, ĵ
  • 3×3 matrix = 9 numbers = 3 columns = 3 destination vectors
  • Matrix-vector multiplication: scale each column by the corresponding coordinate, add them up
  • Matrix multiplication = composition, same right-to-left rule as 2D
  • Non-square matrices represent transformations between dimensions (e.g. 3D→2D)

🔗 Series

← Ch.4 – Matrix Multiplication as Composition → Ch.6 – The determinant