σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Matrix Decompositions skill›Module 1 · Eigenvalues and spectra›Topic 1.3·~45 minIntermediate

The spectral theorem

Skill positionModule 1 of 5 · Topic 3 of 3
1.3 The spectral theorem
—Lab score— / 100Total XP—Streak—

Why symmetric matrices are the nice ones

A general matrix can have complex eigenvalues and eigenvectors that are not perpendicular. A real symmetric matrix, A=ATA=A^{T}A=AT, cannot. The spectral theorem says that such an AAA has only real eigenvalues, that eigenvectors for different eigenvalues are orthogonal, and that you can pick an orthonormal basis of eigenvectors. Collecting them as the columns of QQQ gives A=QΛQTA=Q\Lambda Q^{T}A=QΛQT with QTQ=IQ^{T}Q=IQTQ=I and Λ\LambdaΛ diagonal. Every covariance matrix is symmetric, so this theorem is the reason PCA works.

A=AT  ⟹  A=QΛQT=∑iλi qiqiT,Ak=QΛkQT,wTAw≥λmin⁡∥w∥2A=A^{T}\;\Longrightarrow\;A=Q\Lambda Q^{T}=\sum_i\lambda_i\,\mathbf q_i\mathbf q_i^{T},\qquad A^{k}=Q\Lambda^{k}Q^{T},\qquad \mathbf w^{T}A\mathbf w\ge\lambda_{\min}\lVert\mathbf w\rVert^{2}A=AT⟹A=QΛQT=i∑​λi​qi​qiT​,Ak=QΛkQT,wTAw≥λmin​∥w∥2(1)

The sum form writes AAA as a stack of simple rank-one pieces, each stretching one orthogonal direction. It makes powers trivial: Ak=QΛkQTA^{k}=Q\Lambda^{k}Q^{T}Ak=QΛkQT, and any function of AAA just acts on the eigenvalues. A symmetric matrix is positive semidefinite, wTAw≥0\mathbf w^{T}A\mathbf w\ge0wTAw≥0 for all w\mathbf ww, exactly when all its eigenvalues are non-negative, and positive definite when they are all strictly positive. For a covariance matrix Σ\SigmaΣ the quadratic form wTΣw\mathbf w^{T}\Sigma\mathbf wwTΣw is the variance of the portfolio with weights w\mathbf ww, so it can never be negative, and it is at least λmin⁡\lambda_{\min}λmin​ times the squared length of w\mathbf ww.

Diagonalising a 2 by 2 matrixTake A=(2112)A=\begin{pmatrix}2&1\\1&2\end{pmatrix}A=(21​12​). Its eigenvalues are 3 and 1, with eigenvectors (1,1)(1,1)(1,1) and (1,−1)(1,-1)(1,−1), whose dot product is 1−1=01-1=01−1=0: they are orthogonal. Normalised, they are the columns of Q=12(111−1)Q=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}Q=2​1​(11​1−1​), and the first entry of each is 1/2≈0.7071/\sqrt2\approx0.7071/2​≈0.707. Then A3=Q diag(27,1) QT=12(28262628)=(14131314)A^{3}=Q\,\mathrm{diag}(27,1)\,Q^{T}=\frac12\begin{pmatrix}28&26\\26&28\end{pmatrix}=\begin{pmatrix}14&13\\13&14\end{pmatrix}A3=Qdiag(27,1)QT=21​(2826​2628​)=(1413​1314​), found without multiplying AAA three times. Both eigenvalues are positive, so AAA is positive definite and could be a covariance matrix.
  • Spectral theorem: a real symmetric AAA has real eigenvalues and orthonormal eigenvectors, A=QΛQTA=Q\Lambda Q^{T}A=QΛQT.
  • Definiteness: positive semidefinite means all eigenvalues ≥0\ge0≥0, positive definite all >0>0>0.
  • Powers and functions: Ak=QΛkQTA^{k}=Q\Lambda^{k}Q^{T}Ak=QΛkQT; apply any function to the eigenvalues only.
A covariance matrix must pass this testA matrix assembled by hand or from pairwise estimates over different samples can be symmetric and still have a negative eigenvalue. It then claims that some portfolio has negative variance, and an optimiser will happily exploit that. Checking that the smallest eigenvalue of a symmetric matrix is non-negative (with a tiny tolerance for rounding) is the standard test, and clipping the negative eigenvalues is the standard repair.

Lab · what's graded

  • Facts about symmetric matrices15 pts
  • The larger eigenvalue15 pts
  • A unit eigenvector10 pts
  • A power through the eigendecomposition20 pts
  • A valid covariance matrix15 pts
  • A floor on portfolio variance15 pts
  • Why PCA works10 pts
0/ 7 answered
Tasks
1Choice15 ptsNot answered

Select every statement that holds for every real symmetric matrix.

2Numeric answer15 ptsNot answered

Find the larger eigenvalue of the symmetric matrix (5222)\begin{pmatrix}5&2\\2&2\end{pmatrix}(52​22​).

lambda=lambda =lambda=accepted: ± 0.01
3Numeric answer10 ptsNot answered

The matrix (2112)\begin{pmatrix}2&1\\1&2\end{pmatrix}(21​12​) has the eigenvector (1,1)(1,1)(1,1). What is the first entry of the unit-length eigenvector pointing the same way? Give it to three decimals.

q1=q1 =q1=accepted: ± 0.001
4Matrix · vector20 ptsNot answered

For A=(2112)A=\begin{pmatrix}2&1\\1&2\end{pmatrix}A=(21​12​) with eigenvalues 3 and 1 compute A3=QΛ3QTA^{3}=Q\Lambda^{3}Q^{T}A3=QΛ3QT.

A3=A^3 =A3=
5Choice15 ptsNot answered

Which of these symmetric matrices could be a covariance matrix? (Check the eigenvalues.)

6Numeric answer15 ptsNot answered

A covariance matrix has eigenvalues 0.09 and 0.01. What is the smallest possible variance wTΣw\mathbf w^{T}\Sigma\mathbf wwTΣw of a weight vector with ∥w∥=1\lVert\mathbf w\rVert=1∥w∥=1?

minvariance=min variance =minvariance=accepted: ± 0.0005
7Explain in words10 ptsNot answered

In one or two sentences, say what the spectral theorem guarantees about the principal components of a covariance matrix.

Math modeKeyboard or LaTeX inputTask 1 of 7 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub