"매 ML 의 universal language". Linear Algebra 는 vector space, linear map, eigendecomposition, SVD 의 study — 매 modern ML/DL 의 numerical backbone. 2026 LLM era 에서 attention 은 매 Q@K.T softmax @V — 매 pure linear algebra 의 chain. GPU/TPU 의 design 자체가 매 LA primitive (GEMM) 위에 built.
매 핵심
매 Vector spaces
field \mathbb{F} (보통 \mathbb{R}, \mathbb{C})
closed under linear combinations
basis: minimal spanning set, dim
linear map T: V \to W — represent as matrix in basis
매 Decompositions
LU: A = LU — Gaussian elimination, O(n^3)
QR: A = QR, Q orthogonal — least squares
Eigendecomposition: A = V\Lambda V^{-1}, square only
SVD: A = U\Sigma V^\top — universal, rectangular
Cholesky: A = LL^\top, SPD only, fastest
매 Norms / inner products
\|x\|_2 = \sqrt{x^\top x}, \|x\|_p, \|x\|_\infty
Frobenius: \|A\|_F = \sqrt{\sum a_{ij}^2}
Spectral: \|A\|_2 = \sigma_{\max}(A)
Cauchy-Schwarz: |x^\top y| \le \|x\| \|y\|
매 응용
Attention: \text{softmax}(QK^\top / \sqrt{d}) V.
PCA: SVD of centered X.
Linear regression: normal eq w = (X^\top X)^{-1} X^\top y.
Graph Laplacian: spectral clustering.
Quantum states: complex Hilbert space.
💻 패턴
NumPy basics
importnumpyasnpA=np.random.randn(5,3)# Solve Ax = b in least-squaresb=np.random.randn(5)x,*_=np.linalg.lstsq(A,b,rcond=None)# rank, condition number, determinantprint(np.linalg.matrix_rank(A),np.linalg.cond(A))
S=np.random.randn(4,4);S=S+S.Tw,V=np.linalg.eigh(S)# use eigh for symmetric (stable, real)# reconstructionassertnp.allclose(V@np.diag(w)@V.T,S,atol=1e-10)