Vectors, Matrices and What a Matrix Does

Linear algebra is the language of portfolios and regression, and research interviews test it directly: "compute the volatility of this two-asset portfolio", "why must a covariance matrix be positive semi-definite?", "can these three correlations exist together?". None of these needs heavy theory. Each needs a clear picture of what a vector and a matrix represent.

Portfolios are vectors

Hold nn assets with weights w=(w1,…,wn)w = (w_1, \ldots, w_n), and let their returns over a period be r=(r1,…,rn)r = (r_1, \ldots, r_n). The portfolio return is the dot product

w⊤r=∑i=1nwiriw^\top r = \sum_{i=1}^{n} w_i r_i

A matrix is a linear map: multiplying a vector by an m×nm \times n matrix turns nn numbers into mm numbers, and multiplying two matrices chains two maps. Dimensions must match, (m×n)(n×p)=m×p(m \times n)(n \times p) = m \times p, and the order matters: ABAB and BABA are generally different, when both exist at all.

The rest of this lesson is for subscribers

Unlock every lesson in Basics of Quantitative Finance, and every other premium course.

Subscribe to continue

Test your knowledge

Questions are only available to subscribers.

Keep reading Basics of Quantitative Finance

30 lessons in this course, and every other premium course, on one subscription.

  • Every lesson in every course, with the worked examples and interactive simulators
  • Graded questions on every lesson, with explanations for the wrong answers as well as the right one
  • The trainers, timed assessments and brainteaser library that go with them