Visual Linear Algebra Online, Section 1.2
A big-league baseball player smashes a four-seam fastball with the sweet-spot of the bat. Is it a home run? The answer is — it depends. It depends on the launch angle and on it being a “fair ball”. In other words, what is the direction the ball is traveling a split second after making contact with the bat?
Assuming the ball is hit really hard directly on the sweet-spot, it is likely to be a home run if, for example, its launch angle is between 25 and 35 degrees from the horizontal (and of course, if it stays “fair”).
The initial velocity of the ball is an example of a vector quantity. It has both a magnitude (instantaneous initial speed) and a direction (related to the launch angle).
The force with which the batter hits the ball is also a vector quantity. Its direction is the same as the initial velocity of the ball a split second after being hit (assuming a solid hit in the sweet spot of the bat). Its magnitude is proportional to the instantaneous initial speed of the ball.
These particular vectors are in three dimensions. The main purpose of this section is to investigate vectors in two dimensions. These are also described as two-dimensional vectors.
Video for Section 1.2 of Visual Linear Algebra Online
Here is a video I made that includes a summary of the content of this section of Visual Linear Algebra Online. The written text for Section 1.2 continues further below. In later sections of this online textbook, you will find the summary videos at the very ends of the sections.
Vectors as Arrows
A very natural way to visualize a quantity that has both a magnitude and a direction is with an arrow (a “directed line segment”). Any drawn arrow has a natural magnitude associated with it: its length. It also has a natural direction associated with it: whatever direction it is pointing in. One thing that is important to realize is that an arrow is not the same thing as a ray. It does not go on forever.
But what is the dimension of the “space” the vector/arrow should “live” in? The plane (two-dimensional space)? Three-dimensional space?
It can be either. It can also be zero-dimensional, one-dimensional or even higher-dimensional. Of course, dimensions higher than three present visualization difficulties for humans — not so for higher-dimensional beings.
We will focus on two-dimensional vectors here in Section 1.2. Both higher and lower-dimensional vectors will be discussed in later sections.
A Vector is Completely Determined by Its Magnitude and Direction
A vector, represented as an arrow, can get shorter or longer. It can also point in any direction (of the given space). And, of course, it can change in both ways at the same time.
In the animation above, the magnitude/length and direction of the vector change over time. But the location of the “base” (initial point) of the vector stays fixed. We could also consider this location to be part of what determines a vector. However, it turns out to be best not to. In other words, it is best to say that a vector is completely determined by its length and direction.
The two vectors in the picture below have the same length and direction, but different bases. We consider them to be the same vector, however. There are good reasons for this that we will consider soon.
Placing a vector at an appropriate initial point is important for interpreting the meaning of the vector in applications, however. For example, it is natural to put the initial point of the velocity vector of a moving object at the location of the object. Placing it elsewhere will just cause confusion.
(Rectangular) Components of a Vector
For a two-dimensional vector, it is natural to consider its horizontal and vertical (rectangular) components. That is, how much “displacement” does it have in the horizontal and vertical directions? Displacements are “signed distances”: they can be positive, negative, or zero. As in Section 1.1 (Points, Coordinates, and Graphs in Two Dimensions), it is conventional, in the horizontal direction, to consider rightward displacements to be positive and leftward displacements to be negative. In the vertical direction, we consider upward displacements as positive and downward displacements as negative.
Here is a picture showing four vectors and their components. The blue vector has first (horizontal) component -3 and second (vertical) component -1. For the red vector, the first and second components are 2 and 1, respectively. For the orange vector, the first and second components are -1 and 4, respectively. And for the green vector, the first and second components are 2 and -2, respectively.
Representing Components
It would be natural to use some kind of special notation to represent these components. In fact, there are many such special notations, and different people use different notations. For example, for the green vector in the lower-right corner of the figure above, you will see the following notations for it used by different people: (a) , (b) , (c) , and (d) .
Choice (a) is nice, though it is the same as the notation for the coordinates of a point in two-dimensions. Choice (b) is okay, though less common. It is similar to the notation for a closed interval of numbers (though the numbers are in the wrong order in this case). Personally, I like choice (c) the best of these four choices, though it is similar to notation used for another concept in higher mathematics. Choice (d) is commonly used by scientists and engineers, and requires us to describe the meaning of the symbols and . More to come on this in later sections.
One more type of notation that people use will be the one that we mostly use in this online textbook. We will usually write the components as a so-called “column vector”: either or . The choice of parentheses versus square brackets is purely stylistic. We will probably use both, depending on the situation.
More on Column Vectors
There are good reasons for preferring the column vector notation in a linear algebra textbook. The most important of these is that it will set us up for a nice definition of matrix multiplication.
To save space, we will sometimes use the standard notation to represent either of the column vectors from two paragraphs ago. The “T” stands for “transpose”. For the moment, think of it as something that just tells you to convert the “row vector” to the column vector .
Representing Vectors
It is also traditional to denote a vector without components in various ways as a “vector variable”. For example, if we use the letter “v” as the “name” for the green vector above, you will see the following notations used in various places: (a) , (b) , and (c) . There are even minor variations of these that we will not get into.
We will do as most textbooks do and use boldface: .
As we did with points in Section 1.1 (Points, Coordinates, and Graphs in Two Dimensions), we will also abuse notation and write . This is in spite of the fact that is an arrow and is a column of two numbers.
A Natural Association Between Two-Dimensional Vectors and Points in Two-Dimensions
There is a natural association between two-dimensional vectors and points in two dimensions. This association requires us to define vectors purely in terms of their magnitudes and directions, not their initial points.
Defining the Association
Start by defining a rectangular coordinate system on the plane. Take any vector (arrow) in the plane and rigidly translate it so that its initial point is at the origin. Make sure you do not change its length or direction while performing this transformation. The tip (ending point) of the vector will be “pointing at” (located at) a specific point in the plane.
This defines a “mathematical mapping” . This mapping is invertible. Starting at the point in the plane, if we draw a vector (arrow) whose base is the origin and whose tip is at , we will obtain the original vector (focus just on its length and direction — it does not matter where its initial point is). We therefore have a natural two-way “association” or “one-to-one correspondence” .
You may wonder what the point at the origin gets associated with here. More on that later.
This natural association carries over to an association between the rectangular components of and the rectangular coordinates of . This association is . All of this can be visualized via an animation in the rectangular grid below.
The Importance of the Association
Because this association is so natural, we will often treat as both a vector (arrow) and a point without explicitly mentioning the association. This is very important to understand so that you do not get confused in future sections!
You might wonder how the association changes if we use non-rectangular coordinates, such as slanted coordinates. This will indeed be a topic we eventually address.
Arithmetic and Algebra of Vectors
Vector Addition
Suppose you travel from your home to your friend’s home by walking along a straight line for 100 meters, making one turn, and then walking along another straight line for 200 meters. Each leg of this path can be represented by a “displacement vector” as shown in the picture below. The red vector is the first stage of the trip and the blue vector is the second stage. The magenta (bright pink) vector is your “ultimate” displacement vector (change in position). You never walked along this line, but it represents where you started and where you ultimately ended.
Since the red and blue vectors are being combined in a simple way to produce the magenta vector, it is natural to say that the magenta vector is the “sum” of the red and blue vectors.
In general, to (geometrically) “add” two vectors (arrows) and to get , translate until its base (initial point) is at the tip (ending point) of . The sum of the two vectors is a vector that whose base is at the same location as the base of and whose tip is as at the same location as the tip of .
Other Real-World Applications of Adding Vectors
This geometric way of “adding” vectors is not only natural for displacement vectors, but for many other real-world contexts.
For example, if two forces and are being applied on an object (probably in two different directions and with two different magnitudes), the resulting total force can be viewed as a sum in the same geometric way. This can and should be confirmed with experiments.
As another example, consider a straight river where the velocity of the water flow in the middle is approximately constant . Suppose someone is swimming near the middle of the river at a velocity relative to the flow of the water. Then that person’s velocity relative to the river bank is approximately the sum .
Parallelogram Law
Adding vectors geometrically is often visualized as the “Parallelogram Law”. The essence of this law is displayed in the figure below. The key conclusion is that the sum is along the “diagonal” of the parallelogram. Make sure you understand how this picture is equivalent to our previous geometric description of the sum of two vectors.
Vector Addition Via Rectangular Components
If we know the rectangular components of and , finding the rectangular components of their sum is easy: just add “component-wise”. That is, add the corresponding first and second components to get the new first and second components.
More precisely, if and , then .
While not a proof, this fact is seen to be plausible by considering the picture below. I changed the color of to green so that the red and blue dashed lines are easier to see on top of the green dashed lines.
The sum of the displacements of the two horizontal red and blue lines equals the displacement of the horizontal green line. Likewise, the sum of the displacements of the two vertical red and blue lines equals the displacement of the vertical green line.
Inherited Properties
Since vector addition can be done component-wise, vector addition “inherits” many algebraic properties of real number addition. For example, the commutative and associative properties hold: for any arbitrary vectors, (1) and (2) . The truth of (1) is also clear from the symmetry in the Parallelogram Law above.
Below is a calculation that is essentially a proof of the commutative law. The key step is the equality connecting the first and second lines. This is where the commutative law for real number addition is being used.
Because of the natural association between vectors and points, vector addition can be interpreted as point addition as well, though this is a less common way of viewing it.
Scalar Multiplication
A car travels along a straight local (neighborhood) road on cruise control set to 50 km/hr. The road continues straight and becomes a straight highway. The driver then resets the cruise control at 100 km/hr. Let and be the velocity vectors for the car on the local road and the highway, respectively.
These two vectors should have the same direction because the two combined roads stay straight in the same direction. Since the speed has been doubled, it is also natural to say that the second should be twice as long as the first.
In other words, can be formed by stretching by a factor of two, while not changing its direction. If you are tempted to write , then you have grasped the basic essence of scalar multiplication.
Geometric Definition
In general, suppose we are given a vector and a real number (“scalar”) . We define the “scalar multiple of ”, the vector denoted by , as follows. If , then points in the same direction as and has times the length of . If , then points in the opposite direction as and has times the length of . In other words, is a “(re)scaled version” of .
Here is an animation where starts at (no scaling), increases up toward 3, and then decreases back down toward -3. Notice that the resulting vector is longer than if or . It is shorter than if .
What happens if ? In that case, we write , where is the so-called zero vector. This is a vector that is a “degenerate arrow”. It has no length and no direction. It gets associated with the origin in the plane. In terms of components, .
Scalar Multiplication in Terms of Components
Scalar multiplication can also be done in a very natural way with components. If , then .
Once again, this implies that there are inherited algebraic properties. For example, there are two kinds of distributive laws that hold true: (1) , and (2) .
There are also commutative and associative laws: (3) and (4) .
Law (3) is basically its own proof, since is known to be true already. You will need to verify the other laws component-wise. We leave these for the exercises.
The following animation visually confirms Law (2) for .
Vector Subtraction
The difference can now be algebraically defined. Define it to be the vector sum , where is the same length as , but in the opposite direction. Also note that .
Note also that is what must be added to in order to get . In other words, it is the vector solution to the vector-algebraic equation . This is because .
A geometric interpretation of vector subtraction will be left for the exercises.
Magnitude (Length) and Direction of a Vector
The magnitude or length (or norm) of a vector can be found using the Pythagorean Theorem (Exercise). This length is denoted by (some texts denote it by ) and it is .
If is an angle that the vector makes with the positive horizontal axis, then trigonometry can be used to say that and .
All this means that for the point associated with the vector , the polar coordinates of are , where when . When , then we can take , depending on whether or . If , then and can be anything.
Fundamental properties of magnitudes include, for arbitrary vectors, those shown in the following list:
- , where is the absolute value of the number (scalar) .
- if and only if .
- Triangle Inequality: .
Unit Vectors and Normalization
A vector whose length is is called a unit vector.
If so that , then the vector is a unit vector in the same direction as . This last equation is sometimes written as .
This process of converting a nonzero vector to a unit vector in the same direction as is called normalizing . This is a useful thing to do in many situations.
For example, if , then so .
Dot Product and Angle Between Two Vectors
Is there a way to multiply two vectors? We could certainly multiply component-wise, but does this have much meaning?
For us, tempting as it may be, we will not multiply vectors component-wise.
For our purposes, the “best” way to “multiply” two vectors is to form their so-called dot product. The dot product of two vectors is not another vector, however, it is a number.
Definition of the Dot Product and Relationship to Angles
If and , then their dot product, denoted by , is defined by the equation .
Make sure you always include the dot when you write down this operation symbolically — do NOT just put the vectors next to each other with nothing in between.
Amazingly, by the Law of Cosines, this operation has a very useful relationship to , and an angle between and . Below you will see the key equation. Make sure you realize that the three quantities on the right are all real numbers that are being multiplied.
This equation can then be used to solve for an angle between and . Using the inverse cosine (arccosine) function gives an answer that, by definition, is between and radians:
.
Example
For example, suppose and . Then , and . Therefore, . See the figure below.
Since the cosine of an angle is 0 when the angle is equivalent to radians, the following important fact is easily derived.
Theorem: Two nonzero vectors and are perpendicular to each other if and only if .
When two vectors have a dot product equal to the number zero, we also say the vectors are “normal” or “orthogonal” to each other.
Scientists and engineers tend to use the word “normal”, geometers tend to use the word “perpendicular”, and all other mathematicians tend to use the word “orthogonal”. Actually, there are situations where scientists and engineers use the word “orthogonal” as well. But when they do, it is typically in a more general setting.
Algebraic Properties of Dot Products
As you might expect, the dot product of two vectors satisfies some fundamental algebraic properties. Here they are. We leave proofs for the exercises. Assume that the numbers (scalars) and vectors in these properties are arbitrary vectors in two dimensions.
- Commutative Property: .
- Distributive Property: .
- Associative Property: .
- Non-negativity: . In addition, if and only if .
- Relationship to Magnitude: .
Exercises
- Let and . (a) Compute and draw a diagram that illustrates how to interpret the meaning of this “linear combination” with the Parallelogram Law. (b) Compute and give a natural geometric interpretation of this vector difference. (c) Approximate the angle between and to the nearest hundredth of a degree.
- Use a diagram and the Pythagorean Theorem to help you explain why implies that . Make sure you explain why the hypothesis (premise) of the Pythagorean Theorem is satisfied before you use it.
- Find polar coordinates of the point associated with the vector . Write these coordinates in both exact form and approximate form (with the angle in degrees), accurate to two places after the decimal.
- Prove the associative law for vector addition.
- Prove Laws (1), (2), and (4) for scalar multiplication.
- Normalize the vector . Write your answer in both exact form and approximate form, accurate to two places after the decimal.
- Challenge Problem: Prove the Triangle Inequality.
- Challenge Problem: Use the Law of Cosines to prove that .
- Prove the algebraic properties of dot products.
- Let . Describe all possible vectors that are perpendicular to . There should be a clear relationship between and in your description.