Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Visual Linear Algebra (Note) - Lecture at Shos...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kenji Hiranabe
August 26, 2026
Science
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Visual Linear Algebra (Note) - Lecture at Shosen Grande
2026/8/29 書泉グランデにおける『図解線形代数:ストラング流直感的理解』のミニレクチャー(ノート編)
Kenji Hiranabe
August 26, 2026
More Decks by Kenji Hiranabe
See All by Kenji Hiranabe
Visual Linear Algebra - Lecture at Shosen Grande
hiranabe
0
600
Agile and AI Redmine Japan 2026
hiranabe
4
740
Project Facilitation
hiranabe
1
380
First-Principles-of-Scrum
hiranabe
4
4.1k
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
950
hakoniwa-drone-math-and-physics
hiranabe
0
190
Hakonwa-Quaternion
hiranabe
1
250
Hakoniwa, Mori-san, and me... Drone Simulation and Math
hiranabe
0
190
Conway's law and Agile development - software design and team design
hiranabe
0
170
Other Decks in Science
See All in Science
「念のためのログ保存」を組織全体でやめるためのポリシーと仕組み作り
i2tsuki
4
400
AI for Phage-Host prediction
michielstock
0
130
2026 Introduction to University Math 01
kanaya
0
190
[NLP2026 参加報告会] AI for Science まとめ / NLP2026
lychee1223
0
2k
機械学習 - SVM
trycycle
PRO
2
1.3k
生成AIと司法書士の未来.pdf
tagtag
PRO
0
180
データベース06: SQL (3/3) 副問い合わせ
trycycle
PRO
1
1.2k
データベース09: 実体関連モデル上の一貫性制約
trycycle
PRO
0
1.9k
[Webinaire InnOvin] Coup de Chaud : Comment préserver la santé des animaux
institudelelevage
PRO
0
210
生成AIが科学とRAにもたらしていること:メタサイエンスの視点から
rmaruy
0
140
プレイがつなぐ研究と社会:市⺠‧クリエイター‧SF作家による実践を通じて
hayataka88
1
110
不動産業界における業界特化のデータ整備とAI活用 ─Vertical DataとVertical AI─
estie
1
1k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.1k
How to build a perfect <img>
jonoalderson
1
6.1k
What's in a price? How to price your products and services
michaelherold
247
13k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Done Done
chrislema
187
17k
Balancing Empowerment & Direction
lara
6
1.3k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Mobile First: as difficult as doing things right
swwweet
225
10k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Transcript
『図解線形代数:ストラング流直感的理解』 ショートレクチャ (1) 平鍋健児1 with the kindest help of MIT
Gilbert Strang2 初版: 2026/8/15, updated 2026-08-25 資料: https://anagileway.com/2026/08/25/lecture-at-shosen-grande/ 1 行列計算の基本 ! ! ! # $ # $ # $ ! % & ! % & ! % & ' ( ' ( ' ( " 0"#$ !"#$%&'( )"#*+,-. ! ! " # )"#$%&'( !"#/+,-. " $ " ! " ! " ! ! " ! ! ! ! +,-).&/0 !" # 1 !# ! -2345678 $%&'() $% & !# ! ' 396: ! " $ # ! 89 : $ % & "$ #$ % "% #% ! " ! !3#$%&!4567 !!"#$%&'(#$%&!) *+),-./012!3#$%& ' * "( ' #' * $( ( ) %' * &( ! # % " $ & 図 4: 行列 × ベクトル:2 つの見方 1 X: @hiranabe,
[email protected]
, https://anagileway.com 2 MIT, http://www-math.mit.edu/ # ! !"#$%&'()* 図 3: ベクトル同士の積 " $ & ! " !"#$% &'()*+,-(!" ! " # ./)012 .3! ! # 4567839'($:;<= ! # % " 図 2: 行列の掛け算の基本 $ $ ! # % ' " ( % ' $ ) "% ) #& & & # 89 1 " # !" ! ! " # 図 1: 4 つの見方 !" # # ! ! 12"#/* " ~gs/ 1 ! " ' ( )' # *( $ % &
! !"# ! " $ # & ( % '
* +! , &" , (#) +%! , '" , )#- ! " " % ' *! $ ) % ," & ' ,#( !"$ ! " $ . & ( !"#$%&'!"()"#$%&( *+,*-./012 34(!"#$% !"(!"#$%(5678 ) 図 5: ベクトル × 行列:2 つの見方 ! EE 9 " $ & '! '" *'! +"'" , (! (" ) *#'! +$'" , *%'! +&'" , ! # % *(! +"(" , *#(! +$(" , *%(! +&(" , " $ & '! '" EE H EE G ! ! !"#$%&3.4 3/ '()*+*3 #%,-./#01!2 !"#$AB'(3,-./C%,-./#D4 ! # % ! EE F (! . (" ) - / ) -. ! " -/ ! 3%#4'(56789#3%#:;<=>*?@ ! # % " 0 !! $ 0 & "! 0!" ) 1# 0"" 0!! " 0!" + $ & 0"! !"#$3'(3,-./#01!2 ! # % " $ & '! '" ! ) # % 1%# 1%# 5 (! % % 1 1 (" ) $% 5 ) $% 5 1& 1& 5 1$ 2%# ) 1# 2%# + 1$ 2%$ 2%$ 0!! 0"" ) #0!! %0!! 0!" "0"! #0!" + $0"! %0!" &0"! "0"" $0"" &0"" 図 6: 行列 × 行列:4 つの見方 1.1 練習 行列の積 AB を 4 つの方法で手計算し、すべて同じ値になることを確認せよ。以下で A の列ベク トルを aj 、行ベクトルを a∗i と書く. • (MM1) による計算: 各成分が a∗i bj 3 4 [ 1 5 0 6 • (MM2) による計算: 各列が Abj ] 1 1 4 [ 1 1 = 2 AB = 2 5 0 1 3 3 6 4 [ ] 1 5 0 6 1 AB = 2 2 1 1 ] ... = . . . ... 1 2 3 ... . . . (1) ... ... 4 [ ] 1 5 = . . . 1 ... 6 ... . . . ... (2)
• (MM3) による計算: 各行が a∗i B 1
AB = 2 3 4 [ 1 5 0 6 [ ] ] 1 1 1 4 ] [ 0 1 ] ... [ ] 1 1 1 = 2 5 = . . . 1 [ 0 1 ] ... [ ] 1 1 3 6 0 1 [ ... . . . (3) ... • (MM4) による計算: ランク 1 行列 ai b∗i の和 1 4 [ 1 AB = 2 5 0 3 6 4 [ 1 [ ] ] = 2 1 1 + 5 0 1 1 6 3 ... ... ... ... ... = . . . . . . + . . . . . . = . . . ] 1 ... 2 ... ... ... ... (4) ... . . . ... (5) 基本概念 • 数ベクトル:n 個の実数の並び.x ∈ Rn と書く. • 行列:m 行 n 列の実数の並び.A ∈ Rm×n と書く. • 転置行列:行列の列と行を入れ替えた行列.AT ∈ Rn×m と書く. • 線形空間:ベクトルの加法とスカラー倍に関して閉じている空でない集合.まず Rn . • 線形結合:ベクトルのスカラー倍の和.α1 x1 + α2 x2 + · · · + αn xn の形のベクトル. • 張る空間:ベクトルの線形結合全体の成す空間.⟨x1 , x2 , . . . , xn ⟩ と書く. • 線形独立:どのベクトルも他のベクトルの線形結合で表せない(否定: ). • 部分空間:線形空間の部分集合で,線形空間の条件を満たすもの.R の中の直線や平面など. n • 基底:部分空間の元で,線形独立であり,かつその部分空間を張るベクトルの集合. • 次元:部分空間 V の基底の元の個数(部分空間で一意に決まる!).dim V と書く. 3 A = CR 分解と次元定理 次の行列 A の列ランクと行ランクが等しいことを、A = CR 分解を用いて説明せよ。C は行 (Column)の頭文字,R は行(Row)の頭文字. • 行列の列ランクとは、A の線形独立な列ベクトルの最大数:rank A と書く。 • 行列の行ランクとは、A の線形独立な行ベクトルの最大数:rank AT と書ける。 1 4 5 A = 2 5 7 = 3 6 (6) 9 C の列数(すべて線形独立)と R の行数(すべて線形独立)は等しい(R には必ず C の列数サイ ズの単位行列が含まれる).すなわち,行ランクと列ランクは等しく,A のランクと呼ぶ. 3
! # " ! " ! " ! # !
" " " ! ! # ! " " 図 7: CR 分解(列)(P1) 3.1 ! " ! ! ! ! " # ! " ! ! " # " " ! ! # ! ! ! ! " " " " " " 図 8: CR 分解(行)(P2) 練習 問 5.1 次の行列 A, B の CR 分解を求めよ。 [ ] [ 1 2 1 A= , B= 2 4 2 2 1 3 1 4 1 3 0 ] (7) 解答は, https://anagileway.com/visual-linear-algebra/. 4 つの部分空間 4 次の行列 A とベクトル b によって定まる連立一次方程式 Ax = b に、解は存在するか。4 つの部 分空間を用いて説明せよ。(挑戦:存在しない場合、誤差 ∥Ax − b∥ が最も小さくなる x(最小 2 乗 解)とそのときの b = b̂ を求めよ。) x + 4y + 5z = 1 2x + 5y + 7z = 2 ⇐⇒ Ax = b 1 4 (A = 2 5 3 6 3x + 6y + 9z = 3 x x1 1 1 7 , x = y = x2 , b = 2 , b2 = 5) 9 z x3 3 3 5 (8) 名前 定義 記号 属する空間 列空間 A の列ベクトルの張る空間 C(A) Rm (出力側) 行空間 A の行ベクトルの張る空間 C(AT ) Rn (入力側) 零空間 Ax = 0 となる x 全体 N(A) Rn (入力側) 左零空間 y T A = 0 となる y 全体 N(AT ) Rm (出力側) 列空間 C(A) = ⟨a1 , a2 , a3 ⟩ = {Ax | x ∈ Rn } ⊂ Rm 1 2 3 5 Ax = x1 a1 + x2 a2 + x3 a3 5 4 1 x1 5 7 x2 = x1 2 + x2 5 + x3 7 6 9 4 3 x3 4 6 9 (9) (10)
! " " 図 9: 列空間は列の線形結合 零空間 N(A) = {x
∈ Rn | Ax = 0} ⊂ Rn [1 4 5] x1 x1 + 4x2 + 5x3 0 Ax = [2 5 7] x2 = 2x1 + 5x2 + 7x3 = 0 [3 6 9] x3 3x1 + 6x2 + 9x3 (11) 0 ! 図 10: 行空間は内積が 0 となる x の集合 !" !! # ' ( ) ' ( ) &! * ) + " * ) + , - . , - . ' ( ) ) + / - . ' * , ) - / ) + . # % #! !" ( - !"# " % % !"$ 3 " % # '0 * - !"# " % , ' ! ! 1 ' ' ' (! # $ !" # & % #! ' ( * 1 ) , - ! & !" ! " % # & !"# $ $' $' ' ! ! !"#$ !" , !"# " # $ % 4 ! ) ( ' ! # )% # 5 + ( ' $* ' ! ' !"# $ * !"# " 2 $ % ' ! #! ) % # ! *+, ! # - *+, % # ' . !"#$%& 図 11: 4 つの部分空間 答:b の解 x = (1, 0, 0) + c(−1, −1, 1), b2 の解なし(誤差最小解 x̂ = 13 (2, 1, 0) + c(−1, −1, 1) の とき,b̂2 = (2, 3, 4)). 5 S = QΛQT 対称行列の固有値分解(最高の分解) 固有値分解: n 次正方行列 A に対して Ax = λx となる λ ∈ C を固有値,x ∈ Cn を固有ベクトル と呼ぶ.線形独立で n 本あれば(いつもある訳ではない) ,X = [x1 · · · xn ],Λ = diag(λ1 , . . . , λn ) として,Axi = λi xi =⇒ AX = XΛ, A = XΛX −1 . 5
スペクトル分解: n 次実対称行列 S は、実固有値 λ1 , . . .
, λn と対応する実直交ベクトル qi が必 ず n 本あって,Q = [q1 · · · qn ] を使って分解できる.Sqi = λi qi =⇒ SQ = QΛ, S = QΛQT . S = QΛQT , [ = q1 QQT = QT Q = I T q1 ] λ1 T q3 λ2 q2 λ3 q3T q2 (12) (積分解) = λ1 q1 q1T + λ2 q2 q2T + λ3 q3 q3T ! # " # ! " $" %# %"! !! # ! " ! (和分解) # ! $$ % % % ! $ ! " # $& % ' % ! & " " ! " 図 12: 対称行列のスペクトル分解 A = U ΣV T 特異値分解(汎用の分解) 6 任意の m × n 行列 A は,m × m の直交行列 U 、n × n の直交行列 V 、m × n の長方対角行列 Σ を 用いて分解できる.S = AT A のスペクトル分解に対応.(図は m > n の場合) A = U ΣV T , [ = u1 U T U = U U T = Im , σ u2 ··· V T V = V V T = In , 1 . v1T .. T ] σr v2 . 0 um . . . .. vT n 0 = σ1 u1 v1T + σ2 u2 v2T + · · · + σr ur vrT + 0 + · · · + 0 = r ∑ r = rank A (13) (積分解) σi ui viT (和分解) i=1 AT A は正定値対称行列なので,スペクトル分解ができ固有値 λi は非負.σi = √ λi として,σ1 ≥ σ2 ≥ · · · ≥ σr > 0 とできる.途中で打ち切って近似もできる(Eckart-Young 定理). % $ ! # " ! & !! "" #!# '# # " ! ! !$ "% ## $ " " ! " 図 13: 任意の行列の特異値分解 6.1 練習 SVD による,情報圧縮の例(r を途中で打ち切る)をやってみよう. https://timbauman.io/2020/06/01/svd-image-compression/ 以上 6