I wanted to give my head a bit of a rest from the world of loon that is all around us and retreat to the relative sanity of something concrete and rather beautiful. So, today I’ll continue with my introduction to vectors.
Although I find the maths behind vectors and the whole discipline of Linear Algebra to be fascinating and beautiful in their own right, my principal motivation here is that, eventually, I want to be able to talk about Quantum Mechanics in a bit more detail. And to do that we’re going to need just a little bit more than knowing that a vector is a “pointy thing”.
We’ve already seen in my previous piece on this that we want to be able to describe some things, like forces, with two numbers. We want to know how big the force is, but we also want to know in what direction the force is acting. So just a single number won’t do.
Visually, we can represent a force with an arrow (a pointy thing). The length of the arrow is going to tell us how strong the force is and the direction the arrow is pointing in tells us, you guessed it, the direction the force is acting in.
But we want to be able to do a bit more than just draw pretty pictures; we need to be able to calculate stuff. How do we go about that?
It’s probably best to jump right in with an example. Here’s a pointy thing (an arrow) and what I’ve done here is to add in a coordinate system that allows us to attach numbers to the “bits” of the arrow. In some sense the vector (the arrow) is the “real” thing and the coordinate system an imaginary construct that is going to allow me to use this vector to be able to calculate stuff.
So, I’ve taken my “free-floating” arrow and pinned it to an imagined start point - and it is a choice (for convenience) that I have taken my start point to be the origin (the x = 0 and y = 0) of my coordinate system.
But look what I can do now I’ve done this and made this choice.
I can now use Pythagoras’ Theorem to figure out the length of the arrow. You always knew Pythagoras was good for something, didn’t you?
We can represent the vector with a pair of numbers (x,y), relative to our chosen coordinate system. These numbers are termed the components of the vector (again relative to our chosen coordinate system).
The next thing you might notice is that I could choose to use another pair of numbers to represent this vector; I could choose to use the length of the vector and the angle the vector makes with the x-axis. These are also termed components of the vector, but relative to a new coordinate system - the system that uses (length, angle) instead of (x,y).
In both cases I have to decide upon some notional “start” point.
This is an important point - the vector does not change when I choose a different coordinate representation (it’s the same arrow). Coordinate representations are mental constructs that will allow me to calculate stuff - and I can choose whichever one I think will make my job easier. The answers I get at the end will be the same.
Many of you will probably already have drawn the line, so to speak, at Pythagoras; sod off with all this math stuff being an entirely understandable response. Even more of you will, I imagine, not want to dredge up the horrors of trigonometry from the depths of your brain; it is a schooldays trauma you’ve done your best to forget.
But dredge we must. Remember that one of the things I said was important about vectors was that we could use them to give us a direction? Now that we’ve fixed our coordinates, we can talk about the direction as being the angle the arrow makes with our x-axis and you might dimly recall formulas like the following for figuring out angles
I’ve included the formula more for completeness; it’s just a reminder that we can figure out the angle if we want to.
Now, just in case we’ve got the idea that vectors are only of use to physicists, let’s consider an example from the world of coding. You’re probably familiar with the idea that we can send messages using binary digits, or bits. So you’re probably OK with the notion that some message, m, could be written down as a sequence of 1’s and 0’s like this
m = 10010010011111000
What if we thought of these numbers (the 1’s and 0’s) as being components of a vector? We might write our vector like this
m = (1,0,0,1,0,0,1,0,0,1,1,1,1,1,0,0,0)
You’ve just added in brackets and a bunch of commas you doofus, Rigger. What’s that going to do for us?
Well, let’s think of our new description in terms of an “arrow”. OK - it’s not all that easy, and dare I say impossible, to visualize an arrow in more than 3 dimensions, but let’s imagine we can do this. Let’s now suppose that we only used messages (codewords) that were a certain “distance” from one another in this hard-to-visualize space.
If we had a single error in our message we could “see” that the arrow had been “knocked off course” a bit - but it’s closer to this allowed codeword than some other allowed codeword. We could then “snap back” our arrow onto the right codeword.
This is a very loose description of one way of achieving error correction. In this example, any message that was 1 error away (the distance) from a legitimate codeword would get mapped back on to the legitimate codeword. We can then correct for single errors in transmission - provided that all other legitimate codewords were at least 3 digits in “distance” away.
I might talk about error detection and correction in another article. It will, if nothing else, give me an excuse to talk about another of my scientific heroes; Richard Hamming.
Hamming, another of those “dead white men” who contributed nothing and really should have applied indigenous knowledge1, practically kick-started the whole discipline of error detection and correction and his famous Hamming codes are just things of beauty and genius. Although there exist much better schemes, these days, for achieving error detection and correction, Hamming’s work was a real tour de force at the time.
Having convinced ourselves that vectors might be useful things, let’s press on a bit.
If you look back at the arrow diagram with the coordinate system, you can see that we might be able to think of the arrow as a “journey”. This is (partly) why I’ve labelled a start and an end point. The arrow is going to be the shortest way we can get from the start to end, but it’s not the only way.
We could start at the start and wander along the x-axis for a bit and then head up in the y-axis direction and we’d end up at the end.
So we might describe the same “journey” (start to end) as being 2.5 units in the x-direction followed by 3.4 units in the y-direction, for example. We can think of these x-steps and y-steps as being made of of unit steps in these directions. These unit steps can be described by what are called unit vectors; vectors along the axis directions which are 1 unit in size.
So our vector, r, can also be written in the following way
The i and j here are unit vectors in the x and y directions, respectively. The coordinates tell us how much of these “unit steps” we have.
Usually, when writing a vector in a typed document, we use a bold face - but sometimes you’ll see an arrow placed above the letter to denote that it’s a vector. When you’re writing by hand it’s kind of hard to do bold face and so underlining is also used to denote that we’re dealing with a vector. There are various notations in use - and we’ll see yet another when we get on to the use of vectors to describe things in quantum mechanics.
You’ll be able to see that in the case of arrows drawn on a piece of paper, you can always represent this arrow by some combination of these i and j unit vectors. If you don’t believe me, try it and see. The i and j unit vectors are said to form a basis for the space - which means that any vector in the space can be written down as a sum of these two unit vectors. They’re not the only basis we could use - in fact any two non-parallel vectors can be used as a basis for this 2D space, but they are a very convenient basis to choose.
This notion of “basis” is critically important in quantum mechanics. When you read about things like Schrödinger’s cat, for example, what is being done here is that the vector representing the state of the cat has been written in terms of a sum of a ‘dead’ component and an ‘alive’ component - these components being taken to form a basis for the space in which the state vector for the cat exists.
Now that we know how to write one of these vectors in terms of convenient components we can think about doing stuff with them; things like adding and subtracting them.
Again we can think of this in terms of a journey. If I started at some start position and walked 2 steps north (that is, in the y-direction) and 3 steps east (that is, in the x-direction) and then walked 3 steps north and 5 steps east, where would I end up?
Hopefully, you can see that this is the same as walking 5 steps north and 8 steps east. Usually we put the ‘east’ bit first, the x-coordinate, and so we can write this journey as
So when we add vectors we just add their components. And since subtraction is just addition with negative things2, we can also do vector subtraction.
What about multiplication?
Here’s where it all gets a bit tricky. We can “multiply” vectors together using something called the ‘dot’ product or scalar product, but it’s not all that easy to see what this means. In essence, the dot product is telling us how “much” two vectors are pointing in the same direction.
Two vectors that are at right angles to one another don’t have any amount of ‘point’ in the same direction - there’s no x-ness about a vector in the y-direction (and vice versa), for example.
It’s probably best just to jump right in again and to worry about what it all means, and where it all comes from, a bit later.
For the vectors (arrows) we’ve been talking about, it won’t surprise you that the symbol that gets used to represent this kind of product is actually a dot. Here’s how we do it for the two vectors for our ‘journey’ above :
Yikes - we’ve had to remember how to “expand” brackets and we have these things like the dot product of i with j to work out now.
We don’t really understand it yet - we’ll try to get to that later in instalment III - but we can see that there’s no “x-ness” about the vector j and no “y-ness” about the vector i - and so we’re going to set these ‘cross’ dot products to zero. This gives us
We’re now going to use the property that the dot product of a unit vector with itself is just 1 (we’ll talk more about this in part III) and so we finally end up with the answer 21.
Just a number.
When we’re distinguishing between numbers and vectors we usually call things that aren’t vectors, scalars - hence why the dot product is also known as the scalar product. You ‘multiply’ two vectors together like this and what you get out is just a number - something that isn’t a vector.
It’s all a bit confusing because we haven’t really understood what the heck this weird dot product actually is yet.
Before we do that (in the next instalment), it’s worth pointing out that this notion of the ‘dot’ product in quantum mechanics (technically it’s something called an inner product) is hugely important. It’s these “dot products”, or the quantum mechanical equivalent thereof, that we use to calculate the probabilities of experimental outcomes.
So, although it’s a bit tedious and dry working with arrows and stuff like this, they really form the foundational understanding for much more interesting and important things later on.
That’s probably enough for now. We’ve just delved into the start of things; how vectors are represented so that we can use them to calculate stuff and a couple of the things we can calculate.
I’m aware for some of you this is all very much revision and for others it’s an all too painful reminder of stuff you never wanted to see, ever again.
There might be one or two out there for whom this piece is just right, but it’s probably worthwhile to make sure the foundations are in place because if I do finally get round to discussing quantum mechanics in a bit more depth, we’re going to need all this stuff.
According to Digbert Dinglebat, Chairentity of the Woke History Association.
7 - 3 is just 7 + (-3), for example
Like a glass of neat and very cold gin
I am looking forward to your series on quantum mechanics. Yay!