Skip to content
Mathematics Primer / Linear Algebra

Vectors and Matrices

A portfolio calculation must match each weight to the correct asset return. Vectors preserve that order; matrices combine the same inputs into several outputs, such as factor exposures. This lesson teaches the dimensions and arithmetic needed to perform both calculations. It prepares you to read covariance and NumPy array calculations.
Learning objectives. By the end of this note you should be able to:
  • add vectors, multiply them by scalars and compute dot products;
  • state the dimensions of a matrix and access its entries;
  • multiply a matrix by a vector and check dimensional compatibility;
  • rewrite simultaneous linear equations as Ax=b\mathbf{A}\mathbf{x}=\mathbf{b};
  • interpret dot products and matrix products in portfolio language.

In this lesson

  1. Vectors are ordered collections
  2. Matrices encode linear transformations
  3. Linear systems
  4. A dimensional checklist
  5. Rows turn asset weights into factor exposures

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or browse the Mathematics Primer syllabus.