跳至主要内容

線性算子的矩陣表示法 (Matrix Representations of Linear Operators)

備註

本系列文章內容參考自經典教材 Elementary Linear Algebra (Pearson New International Edition)。本文對應章節:Ch4-5 Matrix Representations of Linear Operators。

線性算子 (Linear Operator)​

定義​

當一個線性變換的定義域 (domain) 和對應域 (codomain) 是同一個向量空間時,這個變換有一個特別的名字:

線性算子 (Linear Operator):一個從向量空間 VV 到自己 VV 的線性變換 T:V→VT: V \to V。

常見的線性算子包括:

算子描述例子
旋轉 (Rotation)將向量繞原點旋轉某個角度R2\mathbb{R}^2 中繞原點旋轉 θ\theta 度
反射 (Reflection)將向量相對於某軸或平面反射相對於 xx 軸的反射
伸縮 (Scaling)沿各方向放大或縮小將所有向量放大 2 倍
剪切 (Shear)沿某方向「傾斜」空間沿 xx 方向的剪切變換
投影 (Projection)將向量投影到子空間投影到某平面
算子 vs 變換

雖然「線性算子」是「線性變換」的特例,但「算子」強調的是「在同一個空間內的操作」。

這個區別在實際應用中很重要:因為輸入和輸出在同一空間,我們可以討論「重複作用」(如 T2=T∘TT^2 = T \circ T)、「特徵值與特徵向量」等概念。


核心問題:如何用矩陣表示線性算子?​

回顧:標準矩陣​

在 Rn\mathbb{R}^n 中,每個線性變換 T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m 都可以用一個 m×nm \times n 矩陣 AA 來表示:

T(x)=AxT(\mathbf{x}) = A\mathbf{x}

這個矩陣稱為 TT 的標準矩陣 (Standard Matrix),它的 columns 就是 T(e1),T(e2),…,T(en)T(\mathbf{e}_1), T(\mathbf{e}_2), \ldots, T(\mathbf{e}_n),其中 {e1,…,en}\{\mathbf{e}_1, \ldots, \mathbf{e}_n\} 是標準基底。

新問題​

如果我們選擇一個非標準的基底 B\mathcal{B},線性算子 TT 對應的矩陣會是什麼?

同一個向量在不同基底下有不同的座標表示。同樣地,同一個線性算子在不同基底下也會有不同的矩陣表示。

我們將這個「相對於基底 B\mathcal{B} 的矩陣」記作 [T]B[T]_\mathcal{B}。


建構 [T]_B 的三步驟​

讓我們透過一個具體範例,一步步理解如何求出線性算子相對於某個基底的矩陣表示。

範例:反射變換​

設 T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 是相對於直線 y=xy = x 的反射變換。

TT 的標準矩陣為:

A=[0110]A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}

(可驗證:T[10]=[01]T\begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \end{bmatrix},T[01]=[10]T\begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \end{bmatrix})

設 B={b1=[11],b2=[1−1]}\mathcal{B} = \left\{ \mathbf{b}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \mathbf{b}_2 = \begin{bmatrix} 1 \\ -1 \end{bmatrix} \right\} 是 R2\mathbb{R}^2 的另一組基底。

目標:求 [T]B[T]_\mathcal{B}。

下圖展示了這個範例的幾何意義與三步驟的計算結果:

反射變換範例

Step 1:在原座標系做變換​

首先,計算 TT 對基底向量 b1,b2\mathbf{b}_1, \mathbf{b}_2 的作用(這裡的輸入輸出都是標準座標):

T(b1)=Ab1=[0110][11]=[11]T(\mathbf{b}_1) = A \mathbf{b}_1 = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix} T(b2)=Ab2=[0110][1−1]=[−11]T(\mathbf{b}_2) = A \mathbf{b}_2 = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 1 \\ -1 \end{bmatrix} = \begin{bmatrix} -1 \\ 1 \end{bmatrix}

幾何理解:

  • b1=[11]\mathbf{b}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} 在直線 y=xy=x 上,反射後不動:T(b1)=b1T(\mathbf{b}_1) = \mathbf{b}_1
  • b2=[1−1]\mathbf{b}_2 = \begin{bmatrix} 1 \\ -1 \end{bmatrix} 垂直於直線 y=xy=x,反射後方向相反:T(b2)=−b2T(\mathbf{b}_2) = -\mathbf{b}_2

Step 2:把 T(b_i) 轉成 B 座標​

現在我們需要把 T(b1)T(\mathbf{b}_1) 和 T(b2)T(\mathbf{b}_2) 表示成 B\mathcal{B} 座標。

回顧座標向量的公式:

[v]B=PB−1v\colorbox{yellow}{$[\mathbf{v}]_\mathcal{B} = P_\mathcal{B}^{-1} \mathbf{v}$}

其中 PB=[b1 b2]=[111−1]P_\mathcal{B} = [\mathbf{b}_1 \ \mathbf{b}_2] = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} 稱為基底矩陣。

計算 PB−1P_\mathcal{B}^{-1}:

PB−1=1(1)(−1)−(1)(1)[−1−1−11]=1−2[−1−1−11]=[1/21/21/2−1/2]P_\mathcal{B}^{-1} = \frac{1}{(1)(-1) - (1)(1)} \begin{bmatrix} -1 & -1 \\ -1 & 1 \end{bmatrix} = \frac{1}{-2} \begin{bmatrix} -1 & -1 \\ -1 & 1 \end{bmatrix} = \begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix}

將 T(b1)T(\mathbf{b}_1) 和 T(b2)T(\mathbf{b}_2) 轉換成 B\mathcal{B} 座標:

[T(b1)]B=PB−1T(b1)=[1/21/21/2−1/2][11]=[10][T(\mathbf{b}_1)]_\mathcal{B} = P_\mathcal{B}^{-1} T(\mathbf{b}_1) = \begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} [T(b2)]B=PB−1T(b2)=[1/21/21/2−1/2][−11]=[0−1][T(\mathbf{b}_2)]_\mathcal{B} = P_\mathcal{B}^{-1} T(\mathbf{b}_2) = \begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix} \begin{bmatrix} -1 \\ 1 \end{bmatrix} = \begin{bmatrix} 0 \\ -1 \end{bmatrix}

驗證:

  • [T(b1)]B=[10][T(\mathbf{b}_1)]_\mathcal{B} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} 表示 T(b1)=1⋅b1+0⋅b2=b1T(\mathbf{b}_1) = 1 \cdot \mathbf{b}_1 + 0 \cdot \mathbf{b}_2 = \mathbf{b}_1 ✓
  • [T(b2)]B=[0−1][T(\mathbf{b}_2)]_\mathcal{B} = \begin{bmatrix} 0 \\ -1 \end{bmatrix} 表示 T(b2)=0⋅b1+(−1)⋅b2=−b2T(\mathbf{b}_2) = 0 \cdot \mathbf{b}_1 + (-1) \cdot \mathbf{b}_2 = -\mathbf{b}_2 ✓

Step 3:排成矩陣 [T]_B​

將上面得到的座標向量作為 columns 排列,就得到 [T]B[T]_\mathcal{B}:

[T]B=[[T(b1)]B[T(b2)]B]=[100−1]\boxed{[T]_\mathcal{B} = \begin{bmatrix} [T(\mathbf{b}_1)]_\mathcal{B} & [T(\mathbf{b}_2)]_\mathcal{B} \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}}
驚人的結果!

在基底 B\mathcal{B} 下,反射變換的矩陣表示竟然是對角矩陣!

這比標準矩陣 A=[0110]A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} 簡潔多了。

對角線上的 11 和 −1-1 直接告訴我們:

  • 沿 b1\mathbf{b}_1 方向不變(乘以 1)
  • 沿 b2\mathbf{b}_2 方向反向(乘以 -1)

這就是「選對基底讓問題變簡單」的威力!


歸納公式:如何計算 [T]_B​

從上面的範例,我們可以歸納出計算 [T]B[T]_\mathcal{B} 的一般步驟:

三步驟方法​

設 T:V→VT: V \to V 是線性算子,B={b1,…,bn}\mathcal{B} = \{\mathbf{b}_1, \ldots, \mathbf{b}_n\} 是基底,AA 是 TT 的標準矩陣。

步驟操作說明
Step 1計算 T(bi)=AbiT(\mathbf{b}_i) = A \mathbf{b}_i在標準座標下做變換
Step 2計算 [T(bi)]B=PB−1T(bi)[T(\mathbf{b}_i)]_\mathcal{B} = P_\mathcal{B}^{-1} T(\mathbf{b}_i)把結果轉成 B\mathcal{B} 座標
Step 3排成矩陣 [T]B=[[T(b1)]B⋯[T(bn)]B][T]_\mathcal{B} = \begin{bmatrix} [T(\mathbf{b}_1)]_\mathcal{B} & \cdots & [T(\mathbf{b}_n)]_\mathcal{B} \end{bmatrix}座標向量作為 columns

如何使用 [T]_B​

上面我們學會了如何建構 [T]B[T]_\mathcal{B}(用基底向量的輸出來建立矩陣)。

現在來看如何使用 [T]B[T]_\mathcal{B}(用這個矩陣來變換任意向量)。

核心公式​

一旦有了 [T]B[T]_\mathcal{B},對於任意向量 v∈V\mathbf{v} \in V,我們可以這樣計算 T(v)T(\mathbf{v}) 的 B\mathcal{B} 座標:

[T(v)]B=[T]B⋅[v]B\colorbox{yellow}{$[T(\mathbf{v})]_\mathcal{B} = [T]_\mathcal{B} \cdot [\mathbf{v}]_\mathcal{B}$}

符號釐清​

符號意義類型
[T]B[T]_\mathcal{B}TT 相對於基底 B\mathcal{B} 的矩陣表示n×nn \times n 矩陣(變換用的工具)
[v]B[\mathbf{v}]_\mathcal{B}v\mathbf{v} 在基底 B\mathcal{B} 下的座標向量n×1n \times 1 向量(輸入)
[T(v)]B[T(\mathbf{v})]_\mathcal{B}T(v)T(\mathbf{v}) 在基底 B\mathcal{B} 下的座標向量n×1n \times 1 向量(輸出)

白話解讀:「T(v)T(\mathbf{v}) 的 B\mathcal{B} 座標」等於「TT 的 B\mathcal{B} 矩陣」乘以「v\mathbf{v} 的 B\mathcal{B} 座標」。

[T]_B 的本質

[T]B[T]_\mathcal{B} 就是「直接在 B\mathcal{B} 座標系裡做 TT 的運算」。

  • 輸入:[v]B[\mathbf{v}]_\mathcal{B}(v\mathbf{v} 的 B\mathcal{B} 座標)
  • 輸出:[T(v)]B[T(\mathbf{v})]_\mathcal{B}(T(v)T(\mathbf{v}) 的 B\mathcal{B} 座標)
  • 過程:乘以矩陣 [T]B[T]_\mathcal{B}

整個運算都在 B\mathcal{B} 座標系裡完成,不需要回到標準座標!


公式推導:[T]_B = B^(-1) A B​

觀察計算過程​

回顧上面的範例,我們做了什麼:

[T(bi)]B=PB−1⋅T(bi)=PB−1⋅A⋅bi[T(\mathbf{b}_i)]_\mathcal{B} = P_\mathcal{B}^{-1} \cdot T(\mathbf{b}_i) = P_\mathcal{B}^{-1} \cdot A \cdot \mathbf{b}_i

將所有 ii 合起來考慮(把基底向量排成矩陣 PBP_\mathcal{B}):

[T]B=[[T(b1)]B⋯[T(bn)]B]=PB−1A[b1⋯bn][T]_\mathcal{B} = \begin{bmatrix} [T(\mathbf{b}_1)]_\mathcal{B} & \cdots & [T(\mathbf{b}_n)]_\mathcal{B} \end{bmatrix} = P_\mathcal{B}^{-1} A \begin{bmatrix} \mathbf{b}_1 & \cdots & \mathbf{b}_n \end{bmatrix}

因為 [b1⋯bn]=PB\begin{bmatrix} \mathbf{b}_1 & \cdots & \mathbf{b}_n \end{bmatrix} = P_\mathcal{B},我們得到:

[T]B=PB−1APB\boxed{[T]_\mathcal{B} = P_\mathcal{B}^{-1} A P_\mathcal{B}}

或者用更簡潔的記號(設 B=PBB = P_\mathcal{B}):

[T]B=B−1AB\colorbox{yellow}{$[T]_\mathcal{B} = B^{-1} A B$}

驗證範例的公式​

讓我們用公式驗證之前的結果:

B=PB=[111−1],B−1=[1/21/21/2−1/2],A=[0110]B = P_\mathcal{B} = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}, \quad B^{-1} = \begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix}, \quad A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} [T]B=B−1AB=[1/21/21/2−1/2][0110][111−1][T]_\mathcal{B} = B^{-1} A B = \begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}

先算 ABAB:

AB=[0110][111−1]=[1−111]AB = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}

再算 B−1(AB)B^{-1}(AB):

B−1AB=[1/21/21/2−1/2][1−111]=[100−1]✓B^{-1} A B = \begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix} \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \quad \checkmark

與前面三步驟方法得到的結果一致!

反向公式​

從 [T]B=B−1AB[T]_\mathcal{B} = B^{-1} A B,我們也可以反推:

A=B⋅[T]B⋅B−1A = B \cdot [T]_\mathcal{B} \cdot B^{-1}

這告訴我們:已知某個基底下的矩陣表示 [T]B[T]_\mathcal{B},可以還原出標準矩陣 AA。


相似矩陣 (Similar Matrices)​

定義​

若存在可逆矩陣 PP 使得:

B=P−1APB = P^{-1} A P

則稱矩陣 AA 和 BB 是相似的 (Similar),記作 A∼BA \sim B。

相似矩陣的幾何意義​

從我們的推導可知:

相似矩陣代表同一個線性算子在不同基底下的表示。

  • AA 是算子 TT 的標準矩陣
  • [T]B=B−1AB[T]_\mathcal{B} = B^{-1}AB 是 TT 相對於基底 B\mathcal{B} 的矩陣
  • 它們是相似的,因為它們描述的是同一個變換,只是「觀察角度」(基底)不同

相似矩陣的性質​

既然相似矩陣代表同一個變換,它們共享許多重要的代數性質:

性質說明
行列式det⁡(A)=det⁡(B)\det(A) = \det(B)
跡 (Trace)tr(A)=tr(B)\text{tr}(A) = \text{tr}(B)
秩 (Rank)rank(A)=rank(B)\text{rank}(A) = \text{rank}(B)
特徵值AA 和 BB 有相同的特徵值
可逆性AA 可逆 ⇔\Leftrightarrow BB 可逆
對角化的預告

尋找「好」的基底,使得線性算子的矩陣表示盡可能簡單(例如對角矩陣),是線性代數的核心課題之一。

這就是對角化 (Diagonalization) 的目標——找到一組基底使得 [T]B[T]_\mathcal{B} 是對角矩陣。

在反射變換的例子中,我們恰好選到了讓 [T]B[T]_\mathcal{B} 成為對角矩陣的基底!


知道基底的輸出,就知道整個變換​

現在我們有了 [T]B=B−1AB[T]_\mathcal{B} = B^{-1}AB 這個公式,可以討論一個更深刻的問題:

核心問題

假設變換 TT 是未知的,但我們知道 TT 把某幾個向量送到哪裡:

T(b1)=u1,T(b2)=u2,T(b3)=u3T(\mathbf{b}_1) = \mathbf{u}_1, \quad T(\mathbf{b}_2) = \mathbf{u}_2, \quad T(\mathbf{b}_3) = \mathbf{u}_3

我們能不能完全確定這個變換 TT?

答案是 Yes,但有一個關鍵前提:

{b1,b2,b3}\{\mathbf{b}_1, \mathbf{b}_2, \mathbf{b}_3\} 必須是一組 基底 (Basis)。

為什麼?

因為基底是空間的「骨架」。知道骨架(基底向量)去哪裡了,整個空間的其他向量也會跟著「線性地」移動。

具體來說:任何向量 v\mathbf{v} 都可以表示為基底的線性組合 v=c1b1+c2b2+c3b3\mathbf{v} = c_1\mathbf{b}_1 + c_2\mathbf{b}_2 + c_3\mathbf{b}_3。

既然 TT 是線性的:

T(v)=c1T(b1)+c2T(b2)+c3T(b3)=c1u1+c2u2+c3u3T(\mathbf{v}) = c_1 T(\mathbf{b}_1) + c_2 T(\mathbf{b}_2) + c_3 T(\mathbf{b}_3) = c_1 \mathbf{u}_1 + c_2 \mathbf{u}_2 + c_3 \mathbf{u}_3

所以,只要輸入是基底,這個變換 TT 就被「鎖死」了——只有一種可能性。

範例:從基底的輸出反求變換矩陣​

設 T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 是一個未知的線性算子,B={b1=[12],b2=[35]}\mathcal{B} = \left\{ \mathbf{b}_1 = \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \mathbf{b}_2 = \begin{bmatrix} 3 \\ 5 \end{bmatrix} \right\} 是 R2\mathbb{R}^2 的一組基底。

已知:

T(b1)=[21],T(b2)=[03]T(\mathbf{b}_1) = \begin{bmatrix} 2 \\ 1 \end{bmatrix}, \quad T(\mathbf{b}_2) = \begin{bmatrix} 0 \\ 3 \end{bmatrix}

目標:求 TT 的標準矩陣 AA。

Solution:

步驟 1:先求 [T]B[T]_\mathcal{B}

把 T(b1)T(\mathbf{b}_1) 和 T(b2)T(\mathbf{b}_2) 轉成 B\mathcal{B} 座標:

B=PB=[1325]B = P_\mathcal{B} = \begin{bmatrix} 1 & 3 \\ 2 & 5 \end{bmatrix}

計算 B−1B^{-1}(使用 2×22 \times 2 反矩陣公式):

B−1=1(1)(5)−(3)(2)[5−3−21]=1−1[5−3−21]=[−532−1]B^{-1} = \frac{1}{(1)(5) - (3)(2)} \begin{bmatrix} 5 & -3 \\ -2 & 1 \end{bmatrix} = \frac{1}{-1} \begin{bmatrix} 5 & -3 \\ -2 & 1 \end{bmatrix} = \begin{bmatrix} -5 & 3 \\ 2 & -1 \end{bmatrix} [T(b1)]B=B−1T(b1)=[−532−1][21]=[−73][T(\mathbf{b}_1)]_\mathcal{B} = B^{-1} T(\mathbf{b}_1) = \begin{bmatrix} -5 & 3 \\ 2 & -1 \end{bmatrix} \begin{bmatrix} 2 \\ 1 \end{bmatrix} = \begin{bmatrix} -7 \\ 3 \end{bmatrix} [T(b2)]B=B−1T(b2)=[−532−1][03]=[9−3][T(\mathbf{b}_2)]_\mathcal{B} = B^{-1} T(\mathbf{b}_2) = \begin{bmatrix} -5 & 3 \\ 2 & -1 \end{bmatrix} \begin{bmatrix} 0 \\ 3 \end{bmatrix} = \begin{bmatrix} 9 \\ -3 \end{bmatrix}

所以:

[T]B=[−793−3][T]_\mathcal{B} = \begin{bmatrix} -7 & 9 \\ 3 & -3 \end{bmatrix}

步驟 2:用反向公式求標準矩陣 A

A=B⋅[T]B⋅B−1A = B \cdot [T]_\mathcal{B} \cdot B^{-1}

先算 B⋅[T]BB \cdot [T]_\mathcal{B}:

B⋅[T]B=[1325][−793−3]=[−7+99−9−14+1518−15]=[2013]B \cdot [T]_\mathcal{B} = \begin{bmatrix} 1 & 3 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} -7 & 9 \\ 3 & -3 \end{bmatrix} = \begin{bmatrix} -7+9 & 9-9 \\ -14+15 & 18-15 \end{bmatrix} = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}

再乘 B−1B^{-1}:

A=[2013][−532−1]=[−10610]A = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix} \begin{bmatrix} -5 & 3 \\ 2 & -1 \end{bmatrix} = \begin{bmatrix} -10 & 6 \\ 1 & 0 \end{bmatrix}

驗證:檢查 Ab1=T(b1)A \mathbf{b}_1 = T(\mathbf{b}_1):

Ab1=[−10610][12]=[−10+121+0]=[21]=T(b1)✓A \mathbf{b}_1 = \begin{bmatrix} -10 & 6 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} -10 + 12 \\ 1 + 0 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix} = T(\mathbf{b}_1) \quad \checkmark

範例:計算 [T]_B(非標準基底)​

設 T:R3→R3T: \mathbb{R}^3 \to \mathbb{R}^3 是線性算子,其標準矩陣為:

A=[120011101]A = \begin{bmatrix} 1 & 2 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \end{bmatrix}

設 B={b1=[100],b2=[110],b3=[111]}\mathcal{B} = \left\{ \mathbf{b}_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, \mathbf{b}_2 = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}, \mathbf{b}_3 = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} \right\}

求 [T]B[T]_\mathcal{B}。

Solution:

使用公式 [T]B=B−1AB[T]_\mathcal{B} = B^{-1} A B。

步驟 1:寫出基底矩陣 B

B=[111011001]B = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix}

步驟 2:計算 B^-1

由於 BB 是上三角矩陣,可以用 row reduction 或觀察法求逆。

B−1=[1−1001−1001]B^{-1} = \begin{bmatrix} 1 & -1 & 0 \\ 0 & 1 & -1 \\ 0 & 0 & 1 \end{bmatrix}

(可驗證 BB−1=IB B^{-1} = I)

步驟 3:計算 AB

AB=[120011101][111011001]=[133012112]AB = \begin{bmatrix} 1 & 2 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 3 & 3 \\ 0 & 1 & 2 \\ 1 & 1 & 2 \end{bmatrix}

步驟 4:計算 B^-1(AB)

[T]B=B−1AB=[1−1001−1001][133012112][T]_\mathcal{B} = B^{-1} A B = \begin{bmatrix} 1 & -1 & 0 \\ 0 & 1 & -1 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 3 & 3 \\ 0 & 1 & 2 \\ 1 & 1 & 2 \end{bmatrix} =[1−03−13−20−11−12−2112]=[121−100112]= \begin{bmatrix} 1-0 & 3-1 & 3-2 \\ 0-1 & 1-1 & 2-2 \\ 1 & 1 & 2 \end{bmatrix} = \begin{bmatrix} 1 & 2 & 1 \\ -1 & 0 & 0 \\ 1 & 1 & 2 \end{bmatrix}