## 2014年12月28日 星期日

### [ RubyAlg ] MIT Linear Algebra, Spring 2005 - Lec10

Source From Here
4 Fundamental Sub-Space: C(A), N(A), R(A)=C(A^T), N(A^T)

R(A) = C(A^T): Row sub-space
N(A^T) = The left nullspace of A

Let A be an mxn Matrix:

For C(A)
dim(C(A)) = r (Rank)
basis = pivot column

For C(A^T)
dim(C(A^T)) = r (Rank) <-- and="" column="" dimension="" font="" has="" row="" same="" space="" the="">
basis =

For N(A)
basis = Special solution
dim(N(A)) = n - r

For N(A^T)
dim(N(A^T)) = m - r
basis =

>> require "alg/math/LinearAlgebra"
>> LA = LinearAlgebra
>> A = LA.newMtx3(3,4,[1,2,3,1, 1,1,2,1, 1,2,3,1])
>> printf("A:\n%s\n", A) # 建立測試的 Matrix A
A:
1 2 3 1
1 1 2 1
1 2 3 1

>> E = A.E # EA=R
>> printf("E:\n%s\n", E)
E:
-1.0 2.0 0.0
1.0 -1.0 -0.0
-1.0 0.0 1.0

>> R = A.rref # Reduced Row Echelon Form
>> printf("R:\n%s\n", R)
R:
1 0 1.0 1.0
0 1 1.0 -0.0
0 0 0.0 0.0

>> AT = A.t # 得到 A 的轉置矩陣
>> printf("A^T:\n%s\n", AT)
A^T:
1 1 1
2 1 2
3 2 3
1 1 1

>> RofAT = AT.rref
>> printf("A^T's rref:\n%s\n", RofAT)
A^T's rref:
1 0 1.0
0 1 -0.0
0 0 0.0
0 0 0.0

Connection between Row Space and Column Space
Consider A as a matrix mxn
1. dim(C(A)) = dim(C(A^T)) = r
2. dim(C(A)) = n - r
3. dim(C(A^T)) = m - r

## 關於我自己

Where there is a will, there is a way!