Vectors and Scalars
There’s a lot of math in physics. It’s often said that mathematics is the language of science, and this is probably more true for physics than most any other science. Mathematics does an amazing job of representing and modelling reality. Of course, as you get to more complicated models of reality, and more advanced physics, you start needing new and fancier mathematical objects.
For most of high-school mathematics, and much of early college mathematics, you deal with mathematical objects that are just numbers, or that could be just numbers. There is one notable exception: geometry. In geometry, your primitive mathematical objects might be geometrical figures, and you learn some ways of making mathematical statements about them because of theorems about triangles and so forth. However, for much of the rest of the math you talk about, the primitives are just numbers. Sure, equations and formulae are mathematical objects too, but they aren’t the “primitive” objects, the basic things that have an independent identity; rather, they’re built from those primitive objects, and operations on those primitive objects.
“What about variables?” you might be asking at this point. Even in algebra, the variables are, in a sense, just numbers. Of course, to really get algebra, you have to learn how to think about variables abstractly, to be able to manipulate the expressions and understand what’s being said about the variables even if you don’t “solve” for them to figure out exactly what number they are. Indeed, sometimes a variable isn’t just one number at a time; consider the equation of a line:
In this equation, m and b are constants; they are just numbers, and they’re supposed to be the same number all the time… although to talk about a line, you don’t necessarily have to know what those numbers are. y and x, however, are variables. For every value of x, there’s a corresponding value of y. In that sense, they aren’t “just numbers”… but every value that x could take is just a number.
When you start applying math to physics, the first wrinkle you add to “just numbers” is dimensionality. If you ask, “How far does the apple fall?”, then “three” is not an adequate answer. “Three meters”, however, would be. Most physical quantities have a dimensionality to them, which means that they have units. When you supply numbers in physics, if you leave the units out, then you haven’t really supplied a meaningful number. However, all of the math still works the same with numbers with units as they do just with numbers. You need to be very careful to bring the units with you. Indeed, your training in math courses have probably done you a disservice, as you’ve probably gotten used to plugging numbers into equations without bothering to write the units down, even when there are units in problems. When you’re doing this in physics, you should always keep the units with the numbers; otherwise, you aren’t even really doing it right, and aren’t talking about the right thing.
However, it turns out that not all useful quantities in physics can be represented by mathematical objects that are just numbers. I’m going to introduce the term “scalar” for a physical quantity that can be represented by just a number. For example, the mass of an object is a scalar: a single number, with units, can represent the mass of an object. However, you can’t represent the motion of an object with scalars. You have to introduce a new kind of mathematical object, the vector.
The sort of vector we’re talking about in physics is something that has both a magnitude and a direction. An example of a vector in physics is velocity. Velocity is not a synonym with speed. Rather, speed is the magnitude of velocity. If a car is going 30mph due north, then that car’s speed, the magnitude of the vector, is 30mph. But the velocity is not 30mph; by itself, “30mph” doesn’t have enough information to convey a vector quantity, because it doesn’t have a direction. The magnitude of a vector is a scalar; it’s just a number.
Here are some standard kinematic quantities:
|Vector Quantity||Magnitude||SI Units|
|Acceleration||Magnitude of Acceleration||m/s2|
Displacement is not the same as distance. Suppose you define a coordinate system, and there is a ball whose coordinates are x=5m, y=0, and z=0. It is not correct to say that the displacement of the ball from the origin is 5m. The distance of the ball from the origin is 5m. The displacement, however, is 5m along the x-direction; you have to specify a direction for a vector quantity. If another ball is at x=-5m, y=0, and z=0, then the displacement of that ball is 5m along the negative-x-direction. The distance of the second ball from the origin is also 5m. Notice that the magnitude (distance) has less information than the full vector quantity (displacement), as two things can have the same distance from the origin, but different displacements.
Because vectors are a different sort of mathematical object from scalars, when you write down a variable that is a vector quantity you need to do something to indicate that you’re talking about a vector. There are different conventions. One of the most common ones is to draw a little arrow over the vector. So, you might indicate displacement by:
Whether or not this renders properly inline will depend on whether your browser is properly supporting Unicode. However, if it does, then the letter after the colon should look like an r with an arrow over it, just like the letter set all by itself above this paragraph: r⃗. (If you don’t see the arrow, blame your browser. It might also be your font; you mignt try installing the Deja Vu fonts and configuring your browser to use them.) Hopefully you see this arrow, and won’t be too confused. If not, I’m also putting vectors in boldface, in hopes that you will be able to distinguish them from scalars.
Similar to displacement, you would write velocity as v⃗, or, setting it off and quoting it and making usre it really works regardless of browser:
The scalar magnitude of a vector is then written as the same letter, only without the boldface or the little arrow. The magnitude of velocity v⃗ is speed v. Sometimes we also use the notation of absolute value to talk about the magnitude of a vector, i.e.:
Representing Vectors: Components, Little Arrows
Now that we’ve conceptually introduced a new mathematical object, the vector, you need to learn how to represent those objects. That is, what’s a way of expressing an object such that you could figure out what the quantity is, and such that you could do calculations with it. For purposes of visualization, a great way to represent a vector is as an arrow. The arrow points in the direction that is the direction of the vector, and the length of the vector represents the magnitude of that vector. On a graph, you can do this in a very straightforward manner with displacements. For instance, consider a ball that is at x=2.0m, y=3.0m, z=0. You could represent the displacement of that ball from the origin with an arrow as follows:
Notice that when I talk about displacement, I keep saying “relative to the origin”. If you say just “displacement” by itself, it should be assumed to be the displacement relative to the origin. (For this to make sense, of course, you must have defined a coordinate system so you know where the origin is.) You can also talk about the relative displacement between two objects. If there is a second ball at x=-1.5m, y=1.0m, z=0. You could talk about the displacement of the first (red) ball from the second (blue) ball, which would be represented by this arrow:
The arrow points just as described: from the blue ball to the red ball.
Arrows are fine for graphically representing vectors, and are great ways to visualize them. You can build intuition about vectors by visualizing them this way. For doing actual calcualtions, however, it’s easier to represent the vector in terms of its components. The components of the vector are just how far the vector points along each axis. If the displacement of the red ball from the origin is the vector r⃗, then the components are rx=2m, ry=3m, and rz=0. Components give us another way of writing a vector, in notation as a “column vector”:
In this example, the three numbers are just lined up above each other. This is not meant to indicate a fraction, but the three separate numbers. You can also write vectors as a row vector; for some more advanced math that goes with physics, it’s important to distinguish between row and column vectors, but for what we’re doing here, it doesn’t matter.
Again, the vector is written as three separate numbers, in brackets, with space between them. You should not take this to mean that the numbers should be multiplied together. (When using this notation in your writing, make sure to leave enough space so it’s clear what you mean.)
Notice that vectors can have units! This should lead you to worry about how long you draw the arrow to represent a vector that isn’t displacement, since the graph above have axes that are scaled in meters (i.e. as lengths). The answer is, because a speed is just a different kind of unit than distance, there isn’t really a right way to do it. As such, you can make the lengths whatever you want. For consistency, though, you should make the relative lengths of velocity arrows are scaled along with the magnitudes of the two vectors. Suppose, for example, that the red ball has velocity v⃗1=[-2m/s, 1m/s, 0m/s], and the blue ball has velocity v⃗2=[4m/s, -2m/s, 0m/s]. You could then indicate the two velocity vectors of the two balls as follows:
With velocity vectors, it’s convential to put the tail of the arrow at the position of the object whose velocity you’re representing. Notice how the relative lengths and the directions of the two vectors are correct relative to each other, but the absolute scaling of the two vectors compared to the labels of the graph isn’t set to anything in particular.
Calculating the magnitude from components
If you have a vector v⃗ represented by components vx, vy, and vz, then it’s very straight forward to calculate the magnitude of the vector by extension of the Pythagorean theorem:
For two dimensions, this is not terribly surprising. Consider the red and blue balls above, and the displacement from the blue ball to the red ball. If you call that displacement r⃗, then you could visualize the vector and its components as follows:
Looking at this, you see that indeed you have a right triangle, and the magnitude of the vector is the hypotenuse, so it’s no surprise that here
(Note that in this specific case, rz=0.)
So what can you do with vectors? There are a handful of operations that are defined for vectors:
- You can add two vectors together
- You can subtract one vector from another
- You can multiply a vector by a scalar
- You can take the dot product of two vectors
- You can take the cross product of two vectors
Notice that there are some things that are not on this list. You can not add a scalar to a vector! That’s simply not a defined mathematical operation. Also, you cannot divide by a vector; that, too, is not a defined mathematical operation. Notice too that there are two different ways to muliply vectors, the dot product and the cross product!
The first three vector operations are pretty easy. To figure out the sum of a vector, just add its components together. That is,
In terms of drawing little arrows, put the tail of the second vector at the tip of the first vector, and then draw an arrow from the tail of the first vector to the tip of the second vector. When you put the tail of the second at the tip of the first, make sure that you pick up and move the second vector without stretching and rotating it. For example:
To multply a vector by a scalar, multiply each of the vector’s components by that scalar. Three examples:
In terms of representing vectors as arrows, when you multiply a vector by a scalar, you stretch the length of the arrow by the same factor as the scalar. If the scalar is negative, you turn the arrow arround. The simplest example is when you multiply a vector by -1; in that case, it would be represented by an arrow of exactly the same length, but pointing in the opposite direction.
For subtracting vectors, I find it easiest to think of adding the negative of the second vector to the first, that is:
For example, below, I have two vectors a⃗ and b⃗. To figure out a⃗–b⃗, first I multiply b⃗ by -1 (i.e. flip it around), and then I do the standard tip-to-tail addition:
We’ll leave cross products for another time. However, it’s worth knowing how to take the dot product of two vectors. When you take the dot product of two vectors, the result is actually a scalar. The dot product of two vectors is defined as:
That is, it is the magnitude of the two vectors multiplied together, times the angle between the two vectors. (In this case, we are using the greek letter θ to represent the angle between the two vectors.
If you remember your trigonometry and the definition of cosine, you may realize that b cos(θ) is the same as the projection of b⃗ on to a⃗:
So,the dot product of two vectors is the magnitude of the two vectors multiplied together, then modified by how much the two vectors are along each other. If they’re pointing in almost the same direction (θ is close to 0), then cos(θ) will be close to 1, and the dot product will be close to the product of the two magnitudes. If the two vectors are almost perpendicular (θ is close to 90°), then cos(θ) will be close to 0 and the dot product will also be close to zero. Finally, if the two vectors point in opposite directions, θ will be bigger than 90° (with θ being exactly 180° if the two vectors are in exactly the opposite direction) and the dot product will be negative.
Calcuating the dot product from components of vectors is straightforward. Just multiply the same components of each vector by each other, and add them all up. That is,
There is one more concept that’s worth mentioning. When you define a coordinate system, you define unit vectors to go along with them. Unit vectors are vectors that have length 1 (“unit length”, hence the name), and that point right along the axes. Note that unit vectors are unitless! There are lots of ways to notate unit vectors. One is to use the variable e⃗ with a subscript indicating which vector you’re talking about. So, the three unit vectors would then be:
Putting together multiplying vectors by scalars and adding vectors together, you can compose any vector by multiplying its components by unit vectors and adding them all together: