Banker. Scientist. Nerd.

Explore my thoughts on finance, technology, AI, and the future of humanity.

Scroll down for my recent posts.

Connect With Me.

Vector Spaces: From Arrows to Kets

Published 31 October 2026

I'm working through Leonard Susskind and Art Friedman's Quantum Mechanics: The Theoretical Minimum[1]. Chapter 1 is about spin and simple experiments, but before the physics can go anywhere it pauses for a mathematical interlude on complex numbers and vector spaces, because the state of a quantum system is a vector in a vector space. Susskind's definition is short and abstract. This post is me making it concrete.

The objective is simple:

  1. Understand what a vector space is, starting from an ordinary arrow in three dimensions.
  2. See how the same idea extends to as many dimensions as you like, even when you can't draw them.
  3. See a vector made of three complex numbers, the kind quantum mechanics actually uses.

Every picture below can be dragged, nudged or rebuilt. The notation matters, but the aim is that each symbol has a picture behind it.

A vector is an arrow, and a list of numbers

Start with one dimension. A vector on a line is a single number, a1a_1: how far to walk, and in which direction (the sign). If e^1\hat{e}_1 is a step of length one along the line, the vector is

A⃗=a1e^1.\vec{A} = a_1 \hat{e}_1.

Now add a second direction, at right angles to the first. To describe a vector in the plane, you need two numbers: walk a1a_1 along the first direction, then a2a_2 along the second.

A⃗=a1e^1+a2e^2.\vec{A} = a_1 \hat{e}_1 + a_2 \hat{e}_2.

Add a third direction, at right angles to both, and you need a third number:

A⃗=a1e^1+a2e^2+a3e^3=(a1a2a3),\vec{A} = a_1 \hat{e}_1 + a_2 \hat{e}_2 + a_3 \hat{e}_3 = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix},

where

e^1=(100),  e^2=(010),  e^3=(001).\hat{e}_1 = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix},\; \hat{e}_2 = \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix},\; \hat{e}_3 = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}.

That's the whole pattern: each new dimension is one more independent direction, and one more number in the list. The column on the right is just the list of how far to walk in each direction. The unit steps e^1,e^2,e^3\hat{e}_1, \hat{e}_2, \hat{e}_3 are called basis vectors, and the numbers aia_i are the vector's components in that basis.

Build one up below. Start in 1D, then switch to 2D and 3D and watch the picture gain a direction each time. The coloured arrows are the components, laid head-to-tail; the plain arrow is the vector they add up to.

The length of the vector comes from Pythagoras, applied twice: once across the floor (a1a_1 and a2a_2), and once up the wall (a3a_3):

∣A⃗∣=a12+a22+a32.|\vec{A}| = \sqrt{a_1^2 + a_2^2 + a_3^2}.

What makes it a space

A single arrow isn't the interesting part. What makes a collection of vectors a vector space is what you can do with them. There are exactly two operations.

Addition, component by component. Geometrically, put the arrows head-to-tail:

A⃗+B⃗=(a1+b1a2+b2a3+b3).\vec{A} + \vec{B} = \begin{pmatrix} a_1 + b_1 \\ a_2 + b_2 \\ a_3 + b_3 \end{pmatrix}.

Multiplication by a number (a scalar), again component by component. Geometrically, stretch the arrow, shrink it, or flip it round if the number is negative:

λA⃗=(λa1λa2λa3).\lambda \vec{A} = \begin{pmatrix} \lambda a_1 \\ \lambda a_2 \\ \lambda a_3 \end{pmatrix}.

A vector space is any collection of objects where these two operations always give you back something in the collection, and behave the way you'd hope. Written out, for any vectors A⃗,B⃗,C⃗\vec{A}, \vec{B}, \vec{C} in the space and any scalars λ,μ\lambda, \mu:

  • Closure: A⃗+B⃗\vec{A} + \vec{B} and λA⃗\lambda\vec{A} are in the space too.
  • The order of adding doesn't matter: A⃗+B⃗=B⃗+A⃗\vec{A} + \vec{B} = \vec{B} + \vec{A}.
  • Nor does the grouping: (A⃗+B⃗)+C⃗=A⃗+(B⃗+C⃗)(\vec{A} + \vec{B}) + \vec{C} = \vec{A} + (\vec{B} + \vec{C}).
  • There's a zero vector, 0⃗\vec{0}, with A⃗+0⃗=A⃗\vec{A} + \vec{0} = \vec{A}.
  • Every step can be undone: each A⃗\vec{A} has a −A⃗-\vec{A} with A⃗+(−A⃗)=0⃗\vec{A} + (-\vec{A}) = \vec{0}.
  • Scaling distributes: λ(A⃗+B⃗)=λA⃗+λB⃗\lambda(\vec{A} + \vec{B}) = \lambda\vec{A} + \lambda\vec{B} and (λ+μ)A⃗=λA⃗+μA⃗(\lambda + \mu)\vec{A} = \lambda\vec{A} + \mu\vec{A}.
  • Scaling is consistent: λ(μA⃗)=(λμ)A⃗\lambda(\mu\vec{A}) = (\lambda\mu)\vec{A}, and 1A⃗=A⃗1\vec{A} = \vec{A}.

None of this mentions arrows or columns of numbers. That's the point Susskind is making: anything that obeys these rules is a vector space, and everything we prove using only these rules applies to all of them. Arrows are just the example we can draw.

Put the two operations together and you get a linear combination, αA⃗+βB⃗\alpha\vec{A} + \beta\vec{B}. Try it: scale A⃗\vec{A} and B⃗\vec{B} with the sliders, and watch the sum move. Then switch on the span.

Some things to try:

  • Set β\beta to 0 and sweep α\alpha from −2-2 to 22. The tip of αA⃗\alpha\vec{A} traces out a line through the origin.
  • Show the span. Every combination αA⃗+βB⃗\alpha\vec{A} + \beta\vec{B} lies on one flat plane through the origin. However you set the sliders, two vectors can't get you off it.
  • Type B = 4, 1, 0 (twice A⃗\vec{A}). Now B⃗\vec{B} adds no new direction, and the span collapses to a line.
  • Turn the picture until you're looking along the plane edge-on, and it becomes a line. That's the third dimension the plane is missing.

This is what "three-dimensional" really means. Two vectors pointing in different directions reach a plane. To reach every point in space you need a third that isn't in that plane. The dimension of a vector space is the number of independent directions you need to reach every vector in it, and any set of that many independent vectors (such as e^1,e^2,e^3\hat{e}_1, \hat{e}_2, \hat{e}_3) is a basis.

Past three dimensions

We can't draw four mutually perpendicular axes, but notice that nothing in the algebra above cared about the number three. A vector in nn dimensions is a list of nn real numbers, and the set of all of them is called Rn\mathbb{R}^n:

A⃗=(a1a2⋮an)=∑i=1naie^i.\vec{A} = \begin{pmatrix} a_1 \\ a_2 \\ \vdots \\ a_n \end{pmatrix} = \sum_{i=1}^{n} a_i \hat{e}_i.

Addition and scaling are still component by component, every axiom still holds, and the length formula just grows more terms:

∣A⃗∣=a12+a22+⋯+an2=∑i=1nai2.|\vec{A}| = \sqrt{a_1^2 + a_2^2 + \cdots + a_n^2} = \sqrt{\sum_{i=1}^{n} a_i^2}.

The trick for building intuition is to stop picturing the arrow and picture the list. Draw each component as a bar. For n≤3n \le 3 the bars and the arrow are two pictures of the same thing; past that, the arrow runs out but the bars carry on happily. Add components below and watch the arrow go first from a line to a plane to space, then disappear, while the bars and the length don't care.

High-dimensional vectors are everywhere once you look. A yield curve quoted at ten maturities is a single point in R10\mathbb{R}^{10}; a greyscale photo with a million pixels is a point in R1,000,000\mathbb{R}^{1{,}000{,}000}. You can still add them, scale them, and measure how far apart they are.

One more tool before we leave real vectors. The inner product (or dot product) of two vectors multiplies matching components and adds them up:

A⃗⋅B⃗=∑i=1naibi.\vec{A} \cdot \vec{B} = \sum_{i=1}^{n} a_i b_i.

It measures how much two vectors point the same way: it's zero when they're at right angles (orthogonal), and the inner product of a vector with itself is its length squared, A⃗⋅A⃗=∣A⃗∣2\vec{A} \cdot \vec{A} = |\vec{A}|^2. The basis vectors are each of length one and orthogonal to each other, which makes them an orthonormal basis, and the components of any vector are just its inner products with them: ai=e^i⋅A⃗a_i = \hat{e}_i \cdot \vec{A}.

Complex numbers, briefly

A complex number z=x+iyz = x + iy, with i2=−1i^2 = -1, is a pair of real numbers, so it's natural to draw it as a point (or an arrow) in a plane: the real part xx across, the imaginary part yy up. The same point can be described by its distance from the origin, rr, and its angle, θ\theta, called its phase:

z=x+iy=r(cos⁡θ+isin⁡θ)=reiθ.z = x + iy = r(\cos\theta + i\sin\theta) = r e^{i\theta}.

These are two ways of describing the same point, not two different numbers. The Cartesian form, x+iyx + iy, says how far across and how far up. The polar form, reiθr e^{i\theta}, says how far out and in which direction. Each can be turned into the other with a little trigonometry:

x=rcos⁡θ,y=rsin⁡θ⟺r=x2+y2,tan⁡θ=yx.x = r\cos\theta, \quad y = r\sin\theta \qquad\Longleftrightarrow\qquad r = \sqrt{x^2 + y^2}, \quad \tan\theta = \frac{y}{x}.

(For θ\theta, take the angle that puts the point in the right quarter of the plane: tan⁡θ\tan\theta alone can't tell 1+i1 + i from −1−i-1 - i.) Drag zz in either picture below, or move either pair of sliders, and watch the other description follow.

Each form is better at something. Adding complex numbers is easiest in Cartesian form: add the $x$s and add the $y$s. Multiplying is easiest in polar form, as we're about to see. Which is why, from here on, you'll see both.

Two facts do almost all the work in what follows:

  • The complex conjugate z∗=x−iy=re−iθz^* = x - iy = r e^{-i\theta} flips the sign of the imaginary part: a reflection in the real axis. Multiplying a number by its conjugate gives a real, non-negative number, the length squared:

z∗z=(x−iy)(x+iy)=x2+y2=r2=∣z∣2.z^* z = (x - iy)(x + iy) = x^2 + y^2 = r^2 = |z|^2.

  • Multiplying complex numbers multiplies their lengths and adds their angles: r1eiθ1⋅r2eiθ2=r1r2 ei(θ1+θ2)r_1 e^{i\theta_1} \cdot r_2 e^{i\theta_2} = r_1 r_2 \, e^{i(\theta_1 + \theta_2)}. So multiplying by i=eiπ/2i = e^{i\pi/2} is a quarter turn, multiplying by −1=eiπ-1 = e^{i\pi} is a half turn, and multiplying by eiφe^{i\varphi} turns by φ\varphi without changing the length.

A complex 3-vector

Now the step Susskind takes. Keep everything about a vector space exactly as it was, but let the components, and the scalars you multiply by, be complex numbers. Following Susskind (and Dirac), we write the vector as a ket, ∣A⟩|A\rangle:

∣A⟩=(α1α2α3)=α1∣1⟩+α2∣2⟩+α3∣3⟩,αi∈C.|A\rangle = \begin{pmatrix} \alpha_1 \\ \alpha_2 \\ \alpha_3 \end{pmatrix} = \alpha_1 |1\rangle + \alpha_2 |2\rangle + \alpha_3 |3\rangle, \qquad \alpha_i \in \mathbb{C}.

Here ∣1⟩,∣2⟩,∣3⟩|1\rangle, |2\rangle, |3\rangle play the role e^1,e^2,e^3\hat{e}_1, \hat{e}_2, \hat{e}_3 did before: a column with a 1 in one place and 0 elsewhere. Adding kets is still component by component, scaling ∣A⟩|A\rangle by a complex number zz multiplies every component by zz, and every axiom from earlier holds word for word. This space is called C3\mathbb{C}^3.

So why can't we just draw it as an arrow? Count the real numbers. Each component αi=xi+iyi\alpha_i = x_i + i y_i is two real numbers, so ∣A⟩|A\rangle holds six. As far as the number of dials to turn goes, C3\mathbb{C}^3 is as big as R6\mathbb{R}^6, and we've just seen that six dimensions won't fit in one picture.

But the bar-chart trick still works, upgraded. Instead of a bar for each component, give each component its own complex plane, and draw it there as an arrow with a length and a phase. Three components, three little planes. Drag the arrows around, and try the buttons, which multiply the whole vector by a complex number.

Things to try:

  • Press × i. All three arrows turn a quarter turn together. Each component's phase changes, but the angles between them (shown under the picture) don't, and neither does any length.
  • Press × −1. A half turn, all together. In a real vector space, multiplying by −1-1 flips an arrow; here you can see it's really a rotation through 180°180° that happens to land on the opposite side.
  • Press × 2, then × ½. Scaling by a real number stretches every component equally, leaving all the phases alone.
  • Press Make real. Every arrow drops onto its real axis. What's left is three real numbers: an ordinary vector in R3\mathbb{R}^3, like the one at the top of this post. The real vectors sit inside the complex ones.
  • Show the bra. More on this next.

Bras, and the length of a complex vector

How long is ∣A⟩|A\rangle? The obvious guess is to reuse the real formula, α12+α22+α32\sqrt{\alpha_1^2 + \alpha_2^2 + \alpha_3^2}. But try it on the one-component vector (i)(i): we get i2=−1i^2 = -1, a negative length squared, which is nonsense.

The fix is the conjugate. Every ket ∣A⟩|A\rangle has a partner, the bra ⟨A∣\langle A|, which is a row whose entries are the conjugates of the ket's components:

⟨A∣=(α1∗α2∗α3∗).\langle A| = \begin{pmatrix} \alpha_1^* & \alpha_2^* & \alpha_3^* \end{pmatrix}.

Switch on the bra in the widget above and you'll see each αi∗\alpha_i^* as the reflection of αi\alpha_i in its real axis. The inner product of a bra with a ket (a "bra-ket", or bracket) multiplies matching entries and adds them up:

⟨B∣A⟩=β1∗α1+β2∗α2+β3∗α3=∑iβi∗αi.\langle B|A\rangle = \beta_1^* \alpha_1 + \beta_2^* \alpha_2 + \beta_3^* \alpha_3 = \sum_{i} \beta_i^* \alpha_i.

With a vector and itself, each term is αi∗αi=∣αi∣2\alpha_i^* \alpha_i = |\alpha_i|^2, which is real and never negative:

⟨A∣A⟩=∣α1∣2+∣α2∣2+∣α3∣2  ≥  0.\langle A|A\rangle = |\alpha_1|^2 + |\alpha_2|^2 + |\alpha_3|^2 \;\ge\; 0.

That's the length squared of ∣A⟩|A\rangle, and it's the number shown under the widget. Each component contributes its own length squared, the strip at the bottom shows how the total is shared out between them, and the Normalise button divides ∣A⟩|A\rangle by ⟨A∣A⟩\sqrt{\langle A|A\rangle} so that the total is exactly 1.

A small worked example. Take

∣A⟩=(1i0),∣B⟩=(i11).|A\rangle = \begin{pmatrix} 1 \\ i \\ 0 \end{pmatrix}, \qquad |B\rangle = \begin{pmatrix} i \\ 1 \\ 1 \end{pmatrix}.

Then ⟨A∣A⟩=1⋅1+(−i)(i)+0=1+1=2\langle A|A\rangle = 1 \cdot 1 + (-i)(i) + 0 = 1 + 1 = 2, and

⟨B∣A⟩=(i)∗⋅1+(1)∗⋅i+(1)∗⋅0=−i+i+0=0.\langle B|A\rangle = (i)^* \cdot 1 + (1)^* \cdot i + (1)^* \cdot 0 = -i + i + 0 = 0.

Neither vector looks perpendicular to the other at a glance, but their inner product is zero, so they are orthogonal. Without the conjugate, we'd have got i+i=2ii + i = 2i instead. One consequence of the conjugate is that the order now matters, a little: swapping bra and ket conjugates the answer, ⟨A∣B⟩=⟨B∣A⟩∗\langle A|B\rangle = \langle B|A\rangle^*.

Everything we built for real vectors carries over. The basis kets are orthonormal, ⟨i∣j⟩=1\langle i|j\rangle = 1 if i=ji = j and 00 otherwise, and the components of any ket are its inner products with them: αi=⟨i∣A⟩\alpha_i = \langle i|A\rangle.

Two real arrows inside one complex vector

The dials group the six real numbers in ∣A⟩|A\rangle one component at a time. They can be grouped the other way too. Write each component as its real and imaginary parts, αk=xk+iyk\alpha_k = x_k + i y_k, and lay them out in a table:

Real part Imaginary part
α1\alpha_1 x1x_1 y1y_1
α2\alpha_2 x2x_2 y2y_2
α3\alpha_3 x3x_3 y3y_3

Each row is one dial. Each column is a list of three real numbers, which is an ordinary real 3-vector:

x=(x1x2x3),y=(y1y2y3),∣A⟩=x+i y.\mathbf{x} = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}, \qquad \mathbf{y} = \begin{pmatrix} y_1 \\ y_2 \\ y_3 \end{pmatrix}, \qquad |A\rangle = \mathbf{x} + i\,\mathbf{y}.

Both x\mathbf{x} and y\mathbf{y} are real: the ii sits outside y\mathbf{y}, not inside it. So both can be drawn as arrows in one 3D picture, just like the vectors at the start of this post, with the three axes now the directions ∣1⟩,∣2⟩,∣3⟩|1\rangle, |2\rangle, |3\rangle. Reading across dial kk gives the kk-th component of x\mathbf{x}; reading up it gives the kk-th component of y\mathbf{y}. For example, (1,i,0)(1, i, 0) is x=(1,0,0)\mathbf{x} = (1, 0, 0) plus ii times y=(0,1,0)\mathbf{y} = (0, 1, 0): two arrows at right angles.

The length splits neatly between the two arrows. Each ∣αk∣2=xk2+yk2|\alpha_k|^2 = x_k^2 + y_k^2, so

⟨A∣A⟩=∑k∣αk∣2=∑kxk2+∑kyk2=∣x∣2+∣y∣2.\langle A|A\rangle = \sum_k |\alpha_k|^2 = \sum_k x_k^2 + \sum_k y_k^2 = |\mathbf{x}|^2 + |\mathbf{y}|^2.

A phase mixes the two arrows

Now multiply ∣A⟩|A\rangle by a phase, eiφ=cos⁡φ+isin⁡φe^{i\varphi} = \cos\varphi + i\sin\varphi, and gather up the real and imaginary parts:

eiφ∣A⟩=(cos⁡φ+isin⁡φ)(x+i y)=(xcos⁡φ−ysin⁡φ)+i (xsin⁡φ+ycos⁡φ).\begin{aligned} e^{i\varphi}|A\rangle &= (\cos\varphi + i\sin\varphi)(\mathbf{x} + i\,\mathbf{y}) \\ &= (\mathbf{x}\cos\varphi - \mathbf{y}\sin\varphi) + i\,(\mathbf{x}\sin\varphi + \mathbf{y}\cos\varphi). \end{aligned}

So after the phase, the real and imaginary arrows are

x′=xcos⁡φ−ysin⁡φ,y′=xsin⁡φ+ycos⁡φ.\mathbf{x}' = \mathbf{x}\cos\varphi - \mathbf{y}\sin\varphi, \qquad \mathbf{y}' = \mathbf{x}\sin\varphi + \mathbf{y}\cos\varphi.

Each new arrow is a blend of the two old ones. As φ\varphi turns, they swing round together, always staying in the plane the original two share. At φ=90°\varphi = 90°, multiplying by ii, the blend is complete: x′=−y\mathbf{x}' = -\mathbf{y} and y′=x\mathbf{y}' = \mathbf{x}. The real arrow has become the imaginary one, and the imaginary arrow has become (minus) the real one.

In general, neither arrow keeps its length. Square them, using ∣u+v∣2=∣u∣2+2 u⋅v+∣v∣2|\mathbf{u} + \mathbf{v}|^2 = |\mathbf{u}|^2 + 2\,\mathbf{u}\cdot\mathbf{v} + |\mathbf{v}|^2:

∣x′∣2=∣x∣2cos⁡2φ−2 (x⋅y)sin⁡φcos⁡φ+∣y∣2sin⁡2φ,∣y′∣2=∣x∣2sin⁡2φ+2 (x⋅y)sin⁡φcos⁡φ+∣y∣2cos⁡2φ.\begin{aligned} |\mathbf{x}'|^2 &= |\mathbf{x}|^2\cos^2\varphi - 2\,(\mathbf{x}\cdot\mathbf{y})\sin\varphi\cos\varphi + |\mathbf{y}|^2\sin^2\varphi, \\ |\mathbf{y}'|^2 &= |\mathbf{x}|^2\sin^2\varphi + 2\,(\mathbf{x}\cdot\mathbf{y})\sin\varphi\cos\varphi + |\mathbf{y}|^2\cos^2\varphi. \end{aligned}

But add them, and the middle terms cancel, while cos⁡2φ+sin⁡2φ=1\cos^2\varphi + \sin^2\varphi = 1 collects the rest:

∣x′∣2+∣y′∣2=∣x∣2+∣y∣2=⟨A∣A⟩.|\mathbf{x}'|^2 + |\mathbf{y}'|^2 = |\mathbf{x}|^2 + |\mathbf{y}|^2 = \langle A|A\rangle.

Length flows back and forth between the real arrow and the imaginary arrow, but the total never changes. That's the length of ∣A⟩|A\rangle, and a phase can't touch it.

See it happen below. The dials at the top are the components of eiφ∣A⟩e^{i\varphi}|A\rangle; the 3D picture shows the real arrow x\mathbf{x} (solid) and the imaginary arrow y\mathbf{y} (dashed) built from them; and the bar at the bottom splits ⟨A∣A⟩\langle A|A\rangle into ∣x∣2|\mathbf{x}|^2 and ∣y∣2|\mathbf{y}|^2.

Things to try:

  • Press Play, or drag the phase slider. All three dials turn together. In 3D, x\mathbf{x} and y\mathbf{y} swing round, growing and shrinking. In the bar, the dividing line between ∣x∣2|\mathbf{x}|^2 and ∣y∣2|\mathbf{y}|^2 slides back and forth, but the total, marked in pink, stays exactly where it is.
  • Break down into components shows x\mathbf{x} (or y\mathbf{y}) laid head-to-tail along ∣1⟩,∣2⟩,∣3⟩|1\rangle, |2\rangle, |3\rangle, as in the first widget. Each step is one dial's reading: across for x\mathbf{x}, up for y\mathbf{y}.
  • Press × i and check the algebra: the solid arrow moves to where the dashed one was, and the dashed one moves to minus where the solid one was.
  • Start from (1,1,0)/2(1, 1, 0)/\sqrt{2}, a real vector. At φ=0\varphi = 0, y\mathbf{y} is zero and all the length is in x\mathbf{x}. Turn to 90°90° and it's all in y\mathbf{y}. Both arrows stay on one line, and the ellipse is squashed flat.
  • Start from (1,i,0)/2(1, i, 0)/\sqrt{2}. Now x\mathbf{x} and y\mathbf{y} are the same length and at right angles, so x⋅y=0\mathbf{x}\cdot\mathbf{y} = 0, the middle terms above vanish, and the split stays at exactly half and half. The arrows just rotate, and the ellipse is a circle.
  • Watch the ellipse. As the phase turns, the tip of x\mathbf{x} runs round it, and so does the tip of y\mathbf{y}, a quarter turn behind. The ellipse itself doesn't move, whatever the phase: it's a picture of ∣A⟩|A\rangle that ignores the overall phase. Its size is set by ⟨A∣A⟩\langle A|A\rangle, while its shape (flat, oval or round) comes from the relative phases between the components.
  • Drag a dial. That changes ∣A⟩|A\rangle itself, not just its phase, so now the total does change.

The inner product can be written in the same terms. Multiplying out ∑k(xB,k−iyB,k)(xA,k+iyA,k)\sum_k (x_{B,k} - i y_{B,k})(x_{A,k} + i y_{A,k}) gives

⟨B∣A⟩=(xB⋅xA+yB⋅yA)+i (xB⋅yA−yB⋅xA),\langle B|A\rangle = (\mathbf{x}_B\cdot\mathbf{x}_A + \mathbf{y}_B\cdot\mathbf{y}_A) + i\,(\mathbf{x}_B\cdot\mathbf{y}_A - \mathbf{y}_B\cdot\mathbf{x}_A),

a complex inner product built from four ordinary dot products. For the worked example above, ∣A⟩=(1,i,0)|A\rangle = (1, i, 0) has xA=(1,0,0)\mathbf{x}_A = (1, 0, 0) and yA=(0,1,0)\mathbf{y}_A = (0, 1, 0), and ∣B⟩=(i,1,1)|B\rangle = (i, 1, 1) has xB=(0,1,1)\mathbf{x}_B = (0, 1, 1) and yB=(1,0,0)\mathbf{y}_B = (1, 0, 0). The real part is 0+0=00 + 0 = 0, the imaginary part is 1−1=01 - 1 = 0, and ⟨B∣A⟩=0\langle B|A\rangle = 0, as before.

Why physics bothers

Susskind uses all of this straight away. The spin of an electron, the system at the heart of his first chapters, is described by a vector in a two-dimensional complex vector space, C2\mathbb{C}^2, with a basis of two kets he calls ∣u⟩|u\rangle (up) and ∣d⟩|d\rangle (down). A general spin state is a linear combination

∣A⟩=αu∣u⟩+αd∣d⟩,|A\rangle = \alpha_u |u\rangle + \alpha_d |d\rangle,

which is the widget above with one fewer plane. The lengths ∣αu∣2|\alpha_u|^2 and ∣αd∣2|\alpha_d|^2 turn out to be probabilities, which is why normalising (making them add up to 1) matters. And the phases, the part with no counterpart in real vectors, turn out to be where interference, and much of what makes quantum mechanics strange, lives. Notice what the × i button showed: turning every component by the same angle changes none of the lengths and none of the angles between components. That's a hint of something Susskind comes back to: multiplying a state by an overall phase eiφe^{i\varphi} changes nothing you can measure.

Real and complex, side by side

Real vectors, Rn\mathbb{R}^n Complex vectors, Cn\mathbb{C}^n
Components nn real numbers nn complex numbers (2n2n real numbers)
Scalars real complex
Picture one arrow (if n≤3n \le 3), or a bar per component an arrow in its own complex plane per component
Basis e^1,…,e^n\hat{e}_1, \dots, \hat{e}_n ∣1⟩,…,∣n⟩\vert 1\rangle, \dots, \vert n\rangle
As real arrows one arrow two: ∣A⟩=x+i y\vert A\rangle = \mathbf{x} + i\,\mathbf{y}
Inner product A⃗⋅B⃗=∑iaibi\vec{A} \cdot \vec{B} = \sum_i a_i b_i ⟨B∣A⟩=∑iβi∗αi\langle B \vert A\rangle = \sum_i \beta_i^* \alpha_i
Length squared ∑iai2\sum_i a_i^2 ⟨A∣A⟩=∑i∣αi∣2=∣x∣2+∣y∣2\langle A \vert A\rangle = \sum_i \lvert\alpha_i\rvert^2 = \lvert\mathbf{x}\rvert^2 + \lvert\mathbf{y}\rvert^2
Swapping order A⃗⋅B⃗=B⃗⋅A⃗\vec{A} \cdot \vec{B} = \vec{B} \cdot \vec{A} ⟨A∣B⟩=⟨B∣A⟩∗\langle A \vert B\rangle = \langle B \vert A\rangle^*

Exercises

A few to check your understanding. Answers are hidden; try them first.

1. Is the set of all real 3-vectors whose components add up to 1 a vector space? What about those whose components add up to 0?

Answer

The first is not. (1,0,0)(1, 0, 0) and (0,1,0)(0, 1, 0) are both in it, but their sum (1,1,0)(1, 1, 0) has components adding up to 2, so it isn't closed under addition (and it doesn't contain 0⃗\vec{0} either). The second is: if two vectors' components each add up to 0, so do those of their sum and of any multiple. Geometrically, it's a plane through the origin, just like the span in the second widget.

2. How many real numbers does it take to specify a vector in C4\mathbb{C}^4? In C2\mathbb{C}^2, the space of electron spin states?

Answer

Eight, and four: two real numbers (a real and an imaginary part, or a length and a phase) for each complex component.

3. Find ⟨A∣A⟩\langle A|A\rangle for ∣A⟩=(1+i,  2,  −i)T|A\rangle = (1 + i,\; 2,\; -i)^T, then normalise ∣A⟩|A\rangle.

Answer

∣1+i∣2=12+12=2|1 + i|^2 = 1^2 + 1^2 = 2, ∣2∣2=4|2|^2 = 4 and ∣−i∣2=1|-i|^2 = 1, so ⟨A∣A⟩=7\langle A|A\rangle = 7. Dividing by 7\sqrt{7} gives the normalised ket 17(1+i,  2,  −i)T\tfrac{1}{\sqrt{7}}(1 + i,\; 2,\; -i)^T.

4. Show that multiplying ∣A⟩|A\rangle by eiφe^{i\varphi} leaves ⟨A∣A⟩\langle A|A\rangle unchanged, as the × i button suggested.

Answer

Every component becomes eiφαie^{i\varphi}\alpha_i, and its conjugate becomes e−iφαi∗e^{-i\varphi}\alpha_i^*. So each term of the inner product becomes e−iφαi∗ eiφαi=αi∗αi=∣αi∣2e^{-i\varphi}\alpha_i^* \, e^{i\varphi}\alpha_i = \alpha_i^* \alpha_i = |\alpha_i|^2, exactly as before.

5. Using the widget, make ∣A⟩|A\rangle real (press Make real), then press × i. Is the result still a real vector? Is it still in C3\mathbb{C}^3?

Answer

No, and yes. Every component is now purely imaginary, so it's no longer in R3\mathbb{R}^3: multiplying a real vector by a complex scalar can take you out of the real vectors. But it's still a perfectly good vector in C3\mathbb{C}^3. That's why the choice of scalars is part of the definition of a vector space: R3\mathbb{R}^3 is closed under multiplication by real numbers, not complex ones.


  1. Susskind, Leonard, and Art Friedman. Quantum Mechanics: The Theoretical Minimum. Basic Books, 2014. ↩︎

SONIA: The Sterling Risk-Free Rate

Published 14 October 2026

This is the second post in my series on how derivatives are priced. In the first post we built up the discount factor in an imaginary world with one bank and one interest rate that never changed. I promised to start relaxing those assumptions, and the obvious one to go first is the rate that never changes.

In the real world, the interest rate that sits underneath almost every sterling derivative and bank loan is quoted fresh every single day. It's called SONIA, and you can see where it is now on my markets page.

As before, I'm writing for someone with high-school maths and no finance background.

What SONIA is

SONIA stands for the Sterling Overnight Index Average. Every business day, banks and other large financial institutions lend each other money in pounds overnight: borrow today, pay it back tomorrow. SONIA is a measure of the interest rate paid on that money.

A quick note on words. Lending money to a bank overnight is the same thing as putting it on deposit there: the same transaction, seen from the lender's side or the bank's. The Bank of England calls them deposits, so I will too.

A few details make it trustworthy:

  • It's based on real deposits, not opinions. The Bank of England collects the actual overnight, unsecured deposits of £25 million or more that took place that day.[1]
  • It's a trimmed average. The Bank sorts the deposits by rate, throws away the top and bottom quarters (weighted by size), and averages the middle half. A handful of odd deposits can't move it much.
  • It's published the next morning. Monday's SONIA is published at 9am on Tuesday. You only find out what yesterday's rate was today.
  • It's quoted as an annual rate, with the "actual days ÷ 365" day count from the last post.

Nobody chooses SONIA's level, but it is steered. It tracks the Bank of England's Bank Rate very closely, usually sitting a few hundredths of a percent below it. When the Monetary Policy Committee changes Bank Rate, SONIA moves with it from the day the new rate takes effect; because of the publication lag, you see the change in the figure published the following morning. The charts on the markets page show the two lines moving almost on top of each other, stepping up and down together.

Trying out the trimmed average

The widget below shows a day's deposits. Each bar is one deposit: its width is the amount lent and its height is the rate. The bars are lined up from the lowest rate to the highest, so trimming simply cuts the same width of volume off each end. Solid bars are kept; faint bars are trimmed away. The trimmed mean is the average height of what's left.

Try the examples and move the slider. At 0% the trimmed average is just the ordinary volume-weighted mean. As the trim gets close to 50%, only the deposit in the very middle is left, which is the median. SONIA uses 25%, somewhere in between: it ignores odd deposits at either extreme, like the median, but still takes an average of the many deposits in the middle, like the mean.

Why it replaced LIBOR

For decades, the reference rate in sterling markets was LIBOR, the London Inter-Bank Offered Rate, which was set each morning by asking a panel of banks what they thought they could borrow at. After it emerged that some of those answers had been manipulated, regulators pushed markets to move to rates based on real transactions. Sterling markets chose SONIA, and LIBOR has now stopped being published altogether.[2]

There's a second difference which matters much more for the maths. LIBOR was a term rate: on day one, you knew the rate for the next three months. SONIA is an overnight rate: on day one, you only know the rate for one night. That changes how interest is worked out, and generally adds complexity to interest calculations. Having said that, the market has converged on a standard approach to these calculations meaning that there is rarely any confusion.

Why it matters

Any contract where one side pays a floating rate of interest needs a rate that both sides can look up, that nobody involved can nudge in their own favour, and that will still be published in thirty years' time. That's what a benchmark is for. SONIA itself has been around since 1997,[3] but since LIBOR's departure it has become the benchmark for sterling: the official "risk-free rate" that the Bank of England and the industry chose for sterling markets to build on. It's considered "risk-free" because you can't easily lend money for a period of time of less than one day, and the chances of the bank you are very happy to lend to today going under by tomorrow are very slim. It also gives the Bank a clean read on how changes in Bank Rate pass through to the rates banks actually lend at.

The most familiar place to see it is a sterling bank loan. A company borrowing in pounds typically pays compounded SONIA plus a margin. The two parts do different jobs:

  • The SONIA part is floating: it goes up and down with the market, and it's the same for every borrower. It's the price of money itself, and has nothing to do with who is borrowing.
  • The margin is a fixed extra amount of interest, set for that particular loan. It reflects the risk of lending to that borrower: a riskier company pays a bigger margin.

One thing it isn't usually linked to is your mortgage. A UK tracker mortgage typically follows Bank Rate, not SONIA, although the two move together so closely that the difference rarely matters.

SONIA matters for this series for one more reason. When banks trade derivatives with each other, they usually post cash as collateral, and that cash typically earns SONIA. That makes SONIA the natural rate for discounting, so the discount curve at the end of this post is built from it.

Earning SONIA over more than one night

Suppose you have £1,000,000 and you want to earn SONIA on it for a week. You can't lock in a week's rate; you can only lend overnight. So you do what we did in stage 2 of the last post: a chain of one-period deposits.

  1. Lend £1,000,000 overnight on Monday at Monday's SONIA.
  2. On Tuesday you get it back with a day's interest. Lend all of it again overnight at Tuesday's SONIA.
  3. Repeat every day until the following Monday.

Each night you earn interest on the interest from the nights before, so this is daily compounding, exactly as before. The only change is that each link in the chain now has its own rate.

Weekends

Overnight lending only happens on business days. Money lent on a Friday comes back on Monday, three nights later, at Friday's rate. So Friday's rate counts three times. Bank holidays work the same way.

A worked example

Here's a made-up week. To make it interesting, the Monetary Policy Committee cuts Bank Rate by a quarter of a percentage point on Thursday, and SONIA drops with it. Each row is one overnight deposit of everything we've built up so far:

Day SONIA Nights Growth factor that night Balance afterwards
Mon 3.9700% 1 1.00010877 £1,000,108.77
Tue 3.9700% 1 1.00010877 £1,000,217.55
Wed 3.9600% 1 1.00010849 £1,000,326.06
Thu 3.7200% 1 1.00010192 £1,000,428.01
Fri 3.7200% 3 1.00030575 £1,000,733.90

Each night's growth is just the one-period formula from the last post, 1+r n3651 + r\,\tfrac{n}{365}, with that day's rate rr and that day's number of nights nn. Chain them together by multiplying:

Growth factor=∏i(1+ri ni365)\text{Growth factor} = \prod_{i} \left(1 + r_i \, \frac{n_i}{365}\right)

The ∏\prod symbol just means "multiply all of these together", the way ∑\sum means "add them all up". Here it comes to 1.00073390, so the week earns £733.90.

It's common to express this as a single annual rate for the whole period, by asking what simple rate over the whole period would have given the same growth:

1+Compounded SONIA×D365=Growth factorCompounded SONIA=(Growth factor−1)×365D=(1.00073390−1)×3657=3.8268%\begin{aligned} 1 + \text{Compounded SONIA} \times \frac{D}{365} &= \text{Growth factor} \\[4pt] \text{Compounded SONIA} &= \left(\text{Growth factor} - 1\right) \times \frac{365}{D} \\[4pt] &= \left(1.00073390 - 1\right) \times \frac{365}{7} = 3.8268\% \end{aligned}

where D=∑iniD = \sum_i n_i is the total number of days in the period (7 in our example).

This is called compounding in arrears: the rate for the period is built up a day at a time, and you only know it once the period is over.

"Compounded SONIA" for a period is therefore a simple interest rate, which when applied for that period, gives a final interest cash flow of the exact same amount as if the daily compounding calculation using each day's SONIA fixing was done properly.

For comparison, a plain weighted average of the five rates (counting Friday three times) is 3.8257%, which would earn £733.70. Compounding adds 20p. Over a week the effect is tiny, but on large sums over long periods it adds up, and pricing models have to get it exactly right.

Try it yourself below. Change the daily rates, or mark a day as a bank holiday and see the previous day's rate stretch to cover it.

The problem: you don't know the rate in advance

In the last post, a deposit of £1,000 at 5% for a year turned into £1,050, and we knew that on day one. That's what let us say the discount factor was 11.05\tfrac{1}{1.05} and value a future payment today.

With SONIA, if I deposit £1 today and roll it overnight for three months, I'll end up with something, but I don't know what until the three months are up. If the Bank of England cuts rates next month, I'll earn less; if it raises them, I'll earn more.

So where does a discount factor come from now?

Locking in a rate: the overnight index swap

The answer is that the market lets you swap an unknown rate for a known one. The contract that does this is called an overnight index swap, or OIS. In its simplest form:

  • You and a counterparty agree a notional amount, say £1,000,000, and a period, say three months (91 days).
  • You agree a fixed rate KK today.
  • At the end of the period, you pay the fixed interest, N×K×91365N \times K \times \tfrac{91}{365}.
  • In return, you receive the SONIA interest, compounded in arrears exactly as in the worked example above.

The £1,000,000 itself never changes hands. It only exists to scale the payments. In practice only the difference is paid: whoever owes more pays the other.

If you have money rolling overnight at SONIA, take the other side of this swap: receive the fixed rate and pay SONIA. That turns your unknown SONIA interest into a known fixed amount. Whatever happens to rates, the SONIA you earn on your deposit cancels the SONIA you hand over in the swap, and you're left with the fixed rate KK. You've locked in a three-month rate. And because the fixed rate is agreed in a busy market, KK is a price that everyone can see.

The widget below puts £1,000,000 on deposit at SONIA for three months, alongside a swap where you receive KK and pay SONIA. Each simulation draws a random path for SONIA, with the Bank of England cutting, holding or raising rates at two meetings along the way. Run it a few times: the deposit on its own earns a different amount every time, but the deposit plus the swap always earns exactly the fixed interest.

From the swap rate to a discount factor

This is where it gets neat. Let's work out what the swap is worth today, using the same "I'm indifferent" argument as the last post.

The SONIA side. Lend £1 overnight and keep rolling it. It costs £1 today, and at the end of the period it pays back Growth factor\text{Growth factor}, whatever that turns out to be. So receiving "Growth factor\text{Growth factor}" at the end is worth exactly £1 today, even though we don't know what it will be. The SONIA interest is Growth factor−1\text{Growth factor} - 1, and the "1" is just a fixed payment at the end, worth DFDF today. So, per £1 of notional:

Value of SONIA side=1−DF\text{Value of SONIA side} = 1 - DF

The fixed side. This is a known amount, KτK\tau, paid at the end, where τ=91365\tau = \tfrac{91}{365} is the day count. A known payment at the end is worth that amount times the discount factor:

Value of fixed side=K τ×DF\text{Value of fixed side} = K\,\tau \times DF

The fair swap rate is the one that makes the deal fair for both sides, so that neither side is worth more than the other on the day it's agreed:

K τ×DF=1−DFK\,\tau \times DF = 1 - DF

Rearranging:

DF=11+K τDF = \frac{1}{1 + K\,\tau}

This is exactly the one-period discount factor from the first post, with the swap rate KK playing the part of the bank's rate. The difference is that in the first post we made the rate up. Here the market tells us what it is.

For example, if the three-month SONIA swap rate is 3.90%:

DF=11+0.039×91365=0.990370DF = \frac{1}{1 + 0.039 \times \tfrac{91}{365}} = 0.990370

So £1,000,000 promised in three months' time is worth £990,370.34 today.

What I've assumed, and what comes next

We've dropped the idea of a single rate that never changes, but a few simplifications remain:

  • Still no risk. SONIA loans are unsecured, so there is a small chance a borrower doesn't pay back. It's overnight and between very large institutions, so the risk is small, and in practice SONIA is treated as close to "risk-free". That's why it's called a risk-free rate.
  • Payment timing. In practice SONIA is published the next morning, so the final day's rate isn't known until after the period has ended. Real contracts allow for this by looking back a few days (usually five business days), or paying a couple of days late. I've ignored this here.
  • One period. Real swaps can run for 30 years, with payments every year. The maths is the same idea, repeated.

That last point is where the next post goes. One swap rate gives us one discount factor. The market quotes SONIA swap rates for many lengths, from one week to fifty years. Line them up, and we can work out a discount factor for every date, one after another, in a process called bootstrapping. The result is the discount curve: the single most important input to pricing almost any sterling derivative.


  1. Bank of England, SONIA key features and policies. It sets out which deposits count (unsecured, overnight, £25 million or more), the trimmed mean of the central 50% of volume, rounding to four decimal places, and publication at 9am on the following London business day. ↩︎

  2. Bank of England, Transition to sterling risk-free rates from LIBOR. Most LIBOR settings ended on 31 December 2021; the last "synthetic" sterling LIBOR setting ended in March 2024, and all 35 LIBOR settings have now ceased. ↩︎

  3. Bank of England, SONIA interest rate benchmark. SONIA was introduced in March 1997; the Bank of England took over running it in 2016 and reformed it in 2018. ↩︎

Reference Materials

Published 04 October 2026

Note: This is a living document. It contains sources that I consider valuable reference material, organised by topic.

Last Update: 04 October 2026

Personal Finance

Science

YouTube Channels

Derivatives

Crypto

  • Bitcoin White Paper. Worth a read if you haven't already. Pump through AI if it all gets too much.

Data

Mathematics

Coding

Python

Explore the rest of my posts.

Keyboard shortcuts

Ctrl K
Search
/
Search
j
Older post
k
Newer post
?
This list