Bra-Ket Notation

Also called Dirac Notation.

Bra-Ket is a way of writing special vectors used in Quantum Physics:

bra|ket

It is a play on the word bracket. A bra on the left and a ket on the right combine to make a bra-ket.

Here's a vector in 3 dimensions:

3D vector with components a, b, and c

We can write this as a column vector like this:

r =
a
b
c

Or we can write it as a "ket":

r =
a
b
c

But kets are special:

The "bra" is similar, but the values are in a row, and each element is the complex conjugate of the ket's elements.

Example: This ket:

a =
2−3i
6+4i
3−i

Has this bra:

a =
2+3i
6−4i
3+i

Its values are in a row, and we also changed the sign (+ to −, and − to +) in the middle of each element.

In "matrix language", changing a ket into a bra (or bra into a ket) is a "conjugate transpose":

Read more at Matrix Types.

Multiplying

Multiplying a bra a and ket b looks like this:

a|b

We use matrix multiplication, in particular the dot product:

The "Dot Product" is where we multiply matching members, then sum up:

1
2
3
7
9
11
= 1×7 + 2×9 + 3×11 = 58

We match the 1st members (1 and 7), multiply them, likewise for the 2nd members (2 and 9) and the 3rd members (3 and 11), and finally sum them up.

In quantum physics the members are usually complex numbers. The bra is the complex conjugate of the ket (we flip the sign of the 'i' part). And then multiplying matching members and summing always gives us a real number and probabilities come out positive!

In effect, the dot product "projects" one vector on to the other before multiplying the lengths:

Dot product projection of vector a onto vector b   Light shining from above a vector to cast a shadow on another vector


Like shining a light to see
where the shadow lies

When the two vectors are at right angles the dot product is zero:

Light shining directly over perpendicular vectors casting no shadow
No shadow is cast!

Example:

Two perpendicular unit vectors a and b on a 2D grid

a =
1
0
, and b =
0
1

So:

a|b =
1
0
0
1
= 1×0 + 0×1 = 0

This can be a simple test to see if vectors are orthogonal (the more general concept of "at right angles")

Example with Complex Numbers

Quantum states often use complex numbers. Here's how the inner product works:

Let's say:

ψ =
1 + i
2 − i

Then the bra is the conjugate transpose:

ψ =
1 − i
2 + i

(note the signs flipped on the i parts)

Now calculate ⟨ψ|ψ⟩:

ψ|ψ =
1 − i
2 + i
1 + i
2 − i
= (12 − i2) + (22 − i2)
= (1 − (−1)) + (4 − (−1))
= 2 + 5 = 7

The length squared is 7, a real, positive number, even with complex components!


The dot product of a vector with itself is the length of the vector times the length of the vector. In other words it is length2:

dot product shine light same vector
Full shadow is cast!

Example:

c =
2
1

So:

c|c =
2
1
2
1
= 2×2 + 1×1 = 5

The dot product is 5

And we can also work out c's length to be √5

Example: What's the length of the vector [1, 2, −2, 5] ?

1
2
−2
5
1
2
−2
5
= 1×1 + 2×2 + (−2)×(−2) + 5×5
= 1 + 4 + 4 + 25
= 34

The dot product is 34, so the vector's length is √34


Note: we can also use Pythagoras' Theorem to calculate its length:

√(12 + 22 + (−2)2 + 52) = √34

Basis

3D vector with components a, b, and c

We can separate the parts of a vector like this:

r =
a
b
c
= a
1
0
0
+ b
0
1
0
+ c
0
0
1

The vectors "1, 0, 0", "0, 1, 0" and "0, 0, 1" form the basis: the vectors that we measure things against.

In this case they are simple unit vectors, but any set of vectors can be used when they are independent of each other (being at right angles achieves this) and can together span every part of the space.

Matrix Rank has more details about linear dependence, span and more.

Orthonormal Basis

In most cases we want an orthonormal basis which is:

Our simple example from above works nicely:

Two perpendicular unit vectors a and b on a 2D grid
The vectors are at right angles,
and each vector has a length of 1

And this one also works:


Two perpendicular unit vectors rotated by 45 degrees on a 2D grid

Let's check it!

Is the dot product zero?

a·b = 1√2×1√2 + 1√2×−1√2

= 1212 = 0

Is each length 1?

|a| = √( (1√2)2 + (1√2)2 ) = √(12 + 12) = 1

|b| = √( (1√2)2 + (−1√2)2 ) = √(12 + 12) = 1

So yes it is an orthonormal basis!

Schrödinger's Cat

Cartoon cat representing a quantum superposition of states

A famous example is "Schrödinger's Cat": a thought experiment where a cat is in a box with a quantum-triggered container of gas. There's an equal chance of it being alive or dead (until we open the box).

It can be written like this:

cat = 1√2alive + 1√2dead

It says the state of the cat is in a superposition of the two states "alive" and "dead".

But why the 1√2 ?

First let's illustrate it like this:

Vector representing the cat state on axes labeled alive and dead

The basis is the two vectors alive and dead. The cat is shown in that probability space as a vector with equal components a and d.

Now let's normalize it!

Normalized

A normalized vector has a length of 1.

We know the dot product of a vector with itself is length2, so a normalized vector has:

a|a = 12 = 1

Example: Normalizing the cat vector

If we assume a = d = 1 we get this:

cat|cat =
1
1
1
1
= 1×1 + 1×1 = 2

But it should be 1, right?

Let's try 1√2:

cat|cat =
1√2
1√2
1√2
1√2
= 12 + 12= 1

So a = d = 1√2, and we get:

cat = 1√2alive + 1√2dead

And it now has a length of 1

Probability

Let's try to find the probability by adding the component lengths a and d:

Probability = 1√2 + 1√2
= 2√2 = √2  ???

But that can't be right, probability can't be greater than 1

In fact we need to take the magnitude (shown using |...|) of each amplitude and square it:

Probability = |1√2|2 + |1√2|2
    = 12 + 12 = 1 (yay!)

This is a general rule in Quantum Physics:

The probability equals the amplitude magnitude squared, in other words:

Probability = |Amplitude|2

Here, the bars |...| mean the absolute value (also called the modulus) of the complex number.

Naming Kets

Notice how we are free to use any word or symbol inside the ket. In some cases numbers are also used, but they are used as labels so don't try to do arithmetic with them.

Many Dimensions

A six-sided die showing multiple faces at once to illustrate quantum superposition

We can easily have many dimensions.

Imagine "Quantum Dice" that are in a superposition of 1, 2, 3, 4, 5 and 6.

The ket looks like this:

die =
a
b
c
d
e
f

For a fair die all elements (a, b, c, d, e, f) are equal, but our dice may be loaded!

Why?

Why do we do all this?

So we can "map" some real world case (usually one with probabilities) onto a well-defined mathematical basis. This then gives us the power to use all the math tools to study it.

Conclusion

The bra-ket notation is a simple way to refer to a vector with complex elements, any number of dimensions, that represents one state in a state space. The probability of any state equals the magnitude of its vector squared.