- Press Reset and check that A=I=[1 0; 0 1]: the grid stays put, blue e₁ points to (1,0) and green e₂ to (0,1).按「重設」,確認 A=I=[1 0; 0 1]:方格不動,藍色 e₁ 指向 (1,0),綠色 e₂ 指向 (0,1)。
- Predict first: after changing the top-right entry b from 0 to 1, where do e₁ and e₂ go? Record your prediction, then change b.先預測:把右上角 b 從 0 改成 1 之後,e₁ 和 e₂ 各會被送到哪裡?記錄預測後再改 b。
- Check the calculation: the image of v=(2,1) is Av=2·(1,0)+1·(1,1)=(3,1). Find the tip of the red arrow, then see why the grid leans: e₂ now goes to (1,1).核對算式:v=(2,1) 的像 Av=2·(1,0)+1·(1,1)=(3,1)。在圖上找到紅色箭頭的終點,再看看方格為什麼變斜:e₂ 被送到 (1,1)。
Predict → change one value → inspect the calculation → read the key idea.先預測 → 改一個值 → 檢查算式 → 看懂重點概念。
A matrix is a function: vector in, vector out.矩陣是一個函數:輸入向量,輸出向量。
The 2×2 matrix A sends each vector v=(x,y) to Av. Instead of moving one arrow, look at the whole grid at once: every grid line moves together.2×2 矩陣 A 把每個向量 v=(x,y) 送到 Av。不要只看一支箭頭,一次看整張方格網:所有格線會一起移動。
Blue frame: column 1 (a,c). Green frame: column 2 (b,d). Entries from −5 to 5; fractions such as 1/2 are accepted.藍框是第 1 欄 (a,c),綠框是第 2 欄 (b,d)。元素範圍 −5 到 5,可輸入分數(例如 1/2)。
Pale grey: the original grid. Pale blue: the image of every grid line. The shaded parallelogram is the image of the unit square; the small flag shows whether the plane has been flipped.淡灰色是原本的方格;淺藍色是每條格線的像。上色的平行四邊形是單位正方形的像;小旗子用來看平面有沒有翻面。
Why does the origin never move?為什麼原點永遠不動?
This holds for every matrix A, not only the ones you try. Grid lines also stay straight, parallel and evenly spaced, because A(u+v)=Au+Av and A(cv)=c·Av.這對每一個矩陣 A 都成立,不只是你試過的例子。格線也一直保持直線、平行、等距,因為 A(u+v)=Au+Av、A(cv)=c·Av。
Ae₁ is column 1; Ae₂ is column 2.Ae₁ 是第 1 欄,Ae₂ 是第 2 欄。
The standard basis vectors are e₁=(1,0) and e₂=(0,1). Every vector is a combination of them, so once you know where they land, you know where everything lands.標準基底(standard basis)是 e₁=(1,0) 和 e₂=(0,1)。每個向量都是它們的組合,所以只要知道它們被送到哪裡,就知道所有向量被送到哪裡。
A e₂ = A(0,1) = (a·0+b·1, c·0+d·1) = (b, d)
A v = A(x e₁ + y e₂) = x·Ae₁ + y·Ae₂
So the matrix is simply a list of two images written as columns. The last line is Chapter 1’s linear combination au+bv, with u=Ae₁, v=Ae₂, a=x and b=y.所以矩陣就是把兩個像寫成兩欄。最後一行就是第 1 章的線性組合 au+bv,只是 u=Ae₁、v=Ae₂、a=x、b=y。
The Transformer’s W is also a list of columns.Transformer 的 W 也是一排欄。
In Chapter 4, W has 3 rows and 2 columns: it sends a vector in ℝ² to three scores in ℝ³. The same rule holds:第 4 章的 W 有 3 列 2 欄:把 ℝ² 的向量送到 ℝ³ 的三個分數。規則完全一樣:
So if x₂ increases by 1, every score increases by the matching number in column 2. Keep this in mind when you reach the Transformer lab.所以 x₂ 增加 1 時,每個分數都會加上第 2 欄中對應的數。到 Transformer 實驗室時可以用上。
讓方格對上影子Match the shadow
每一關有一個淡紫色的「影子」:某個矩陣把單位正方形和小旗子送到的位置。拖動藍色 Ae₁ 和綠色 Ae₂ 的箭頭尖端,或直接輸入矩陣,讓你的像和影子完全重合。拖箭頭時注意:藍色箭頭只會改變 a、c,綠色只會改變 b、d。Each level shows a pale violet “shadow”: where some matrix sends the unit square and the small flag. Drag the tips of blue Ae₁ and green Ae₂, or type the matrix, until your image matches the shadow exactly. Notice that dragging blue changes only a and c, and green only b and d.
det A tells you how much area grows, and whether the plane flips.det A 告訴你面積放大幾倍,以及平面有沒有翻面。
The unit square has area 1. Its image is the parallelogram spanned by the two columns. The determinant det A = ad − bc measures that parallelogram with a sign.單位正方形的面積是 1,它的像是兩欄張成的平行四邊形。行列式 det A = ad − bc 用「帶正負號」的方式量這個平行四邊形。
The curved arrow turns from Ae₁ to Ae₂. Counterclockwise means no flip; clockwise means the plane has flipped. The flag turns into its mirror image when det < 0.弧形箭頭從 Ae₁ 轉向 Ae₂:逆時針表示沒有翻面,順時針表示翻面了。det < 0 時,小旗子會變成鏡像。
Dependent columns squash the plane.相依的兩欄會把平面壓扁。
In Chapter 2, (1,2) and (2,4) were dependent: 2·(1,2) − 1·(2,4) = (0,0). Use them as the columns of A:第 2 章中,(1,2) 和 (2,4) 相依:2·(1,2) − 1·(2,4) = (0,0)。把它們當成 A 的兩欄:
Av = x·(1,2) + y·(2,4) = (x+2y)·(1,2).
A(2,−1) = 2·(1,2) − 1·(2,4) = (0,0).
Every output lies on the line y=2x, the span from Chapter 2. The nonzero vector (2,−1) is sent to 0, just like (0,0). Two different inputs give the same output, so the output cannot tell you which input you started from: A cannot be undone.每個輸出都落在直線 y=2x 上,也就是第 2 章的張成空間。非零向量 (2,−1) 被送到 0,和 (0,0) 一樣。兩個不同輸入得到同一個輸出,所以只看輸出無法知道原本的輸入:A 無法還原。
Shear [1 1; 0 1]: the square leans over, but det = 1·1 − 1·0 = 1, so the area is unchanged.剪切(shear)[1 1; 0 1]:正方形歪了,但 det = 1·1 − 1·0 = 1,面積沒有變。
Reflection [0 1; 1 0]: e₁ and e₂ swap places. Area is still 1, but det = −1: the flag is mirrored.鏡射(reflection)[0 1; 1 0]:e₁ 和 e₂ 互換位置。面積仍是 1,但 det = −1:小旗子變成鏡像。
Rotation by 90° [0 −1; 1 0]: det = 0·0 − (−1)·1 = 1. Turning is not flipping.旋轉 90° [0 −1; 1 0]:det = 0·0 − (−1)·1 = 1。旋轉不是翻面。
Optional: why is |ad − bc| an area?選讀:為什麼 |ad − bc| 是面積?
Take the case a, b, c, d > 0 with column 1 below column 2. The parallelogram sits in a rectangle of size (a+b)×(c+d). Remove two triangles of area ac/2, two triangles of area bd/2 and two rectangles of area bc:考慮 a、b、c、d > 0 且第 1 欄在第 2 欄下方的情形。平行四邊形放在 (a+b)×(c+d) 的長方形裡,扣掉兩個面積 ac/2 的三角形、兩個面積 bd/2 的三角形和兩個面積 bc 的長方形:
This is one case, not a general proof; the general statement needs properties of determinants.這只是一種情形的推導,不是一般證明;一般情形需要行列式的性質。
Predict it. Check it. Learn the key idea.先預測、再核對、看懂重點。
Allow 25–30 minutes for exploration and practice. Every computed answer is checked exactly; feedback names the row, column or determinant step to revisit. Retrying is encouraged.預留 25–30 分鐘探索與練習。所有計算題都用精確分數核對;回饋會指出該回頭看的列、欄或行列式步驟。鼓勵你多試幾次。
Column 1 of A is fixed at (2,−1). Choose column 2 so that A squashes the whole plane onto a line, then give a nonzero v with Av = 0.A 的第 1 欄固定為 (2,−1)。選第 2 欄,讓 A 把整個平面壓成一條線;再給一個非零向量 v,使 Av = 0。
A = [2 b; −1 d]
Many answers are possible.答案不只一種。