# Lecture 2: Linear Algebra

Source: https://www.youtube.com/watch?v=0uimNNIuUyY
Recap page: https://rapidrecap.app/video/0uimNNIuUyY
Generated: 2025-12-03T16:12:23.566+00:00

---
## Quick Overview

Peter Kempthorne introduces the first linear algebra lecture, outlining a curriculum covering basic vector algebra, special matrices, eigenvectors, decompositions, and the Perron-Frobenius theorem, emphasizing the utility of linear algebra in quantitative finance for simplifying computations.

**Key Points:**
- The lecture covers basic fundamentals including vector algebra, special matrices, eigenvectors and eigenvalue, decompositions, and the Perron-Frobenius theorem, noting linear algebra makes computations in quantitative finance easier.
- A portfolio holding S&P 500 stocks is represented by a vector q, and its value is calculated using the dot product, q dot p, where p is the vector of closing prices.
- Short selling involves borrowing stock, selling it, and buying it back later, which credits the brokerage account with positive cash flow, potentially allowing investment exceeding 100% of wealth.
- A zero-cost portfolio is one where the components are not all zero, but the net value of the portfolio is zero, and an arbitrage portfolio has zero cost but a positive profit and loss.
- The stationary distribution (pi star) for a Markov chain satisfies pi star equals A pi star, provided the chain is acyclic, and this relationship is fundamentally tied to eigenvalues, where one eigenvalue is 1.
- The matrix equation for eigenvalues and eigenvectors, Av = lambda v, is solved by finding roots of the determinant of (A minus lambda i) equals 0.
- In multi-asset models, no arbitrage exists if a pricing measure Q* exists where the initial price of asset j equals a discount factor times the expected terminal price of that asset across states.

**Context:** This transcript is from Lecture 2 of a course on Linear Algebra, presented by Peter Kempthorne, specifically tailoring the mathematical concepts to applications in quantitative finance. The lecture begins by defining basic vector notation, such as using bold letters for vectors, and immediately connects these concepts to financial examples like stock prices in the S&P 500 index and portfolio valuation using the dot product.

## Detailed Analysis

The lecture establishes fundamental linear algebra concepts, starting with vectors as ordered lists of numbers, often visualized as directed line segments, and applies them to portfolio management, where the portfolio value is the dot product of share quantities (q) and stock prices (p). Kempthorne discusses portfolio rebalancing as adjusting share quantities by a delta constrained by a net zero change in value, leading to the concept of Portfolio Net Gain (PnL). The discussion transitions to matrix algebra, defining matrix multiplication as a linear combination of the columns of the first matrix, which is deemed more intuitive than the row-dot-product interpretation. Special matrices like symmetric matrices and the identity matrix are reviewed, followed by an application to stochastic matrices (Markov chains), where the stationary distribution (pi star = A pi star) is linked to an eigenvalue of 1. Subsequently, the lecture explores positive matrices in a one-period market model involving a risk-free bond and a risky stock with random terminal values (STu, STd). This framework is used to introduce contingent claims and replicating portfolios, where the possibility of replicating any payoff vector via a portfolio of underlying assets relates to market completeness. The core insight in arbitrage-free markets is the existence of a pricing measure Q* such that initial asset prices equal the discounted expected terminal price. Finally, the lecture briefly covers solving systems of linear equations (Ax=B) and delves into eigenvalues and eigenvectors (Av = lambda v), showing how diagonalization (A = S lambda S inverse) simplifies calculating powers of a matrix, which is useful for state equations and Kalman filters.

### Vector and Portfolio Algebra

- Bold notation for vectors in m-dimensional space
- Portfolio value calculated as the dot product (q dot p)
- Vector addition and scalar multiplication defined by element-wise operations

### Portfolio Management Concepts

- Rebalancing involves adjusting shares by delta_j constrained by zero sum change in value
- PnL is the change in portfolio value from day t to t+1
- Short selling allows positive cash flow by selling borrowed shares

### Matrix Algebra Fundamentals

- Matrix A multiplied by vector v corresponds to a linear combination of A's columns
- Matrix multiplication AB requires conformal dimensions (n columns of A match n rows of B)
- Transpose of a product reverses the order of transposes: (AB)T = BT AT

### Stochastic Matrices and Markov Chains

- Stochastic matrices have columns summing to 1, representing transition probabilities (Aij is P(next state=i
- previous state=j))
- The stationary distribution pi* exists if pi* = A pi*, related to an eigenvalue of 1, provided the chain is acyclic

### Asset Pricing and Arbitrage

- One-period model uses a bond (risk-free rate RF) and a stock with random terminal values (STu, STd)
- A contingent claim C can be replicated if a portfolio of B and S satisfies payoff equations
- No arbitrage exists if an initial price equals the discounted expected terminal price using a pricing measure Q*

### Eigenvalues and Diagonalization

- Eigenvalue/eigenvector satisfy Av = lambda v
- Diagonalization A = S lambda S inverse exists if eigenvectors are linearly independent
- Powers of A simplify to S lambda^k S inverse

