The Geometry of R n Supplemental Lecture Notes for Linear Algebra Courses at Georgia Tech Contents Vectors in R n. Vectors....................................... The Length and Direction of a Vector......................3 The Relationship Between Points and Vectors................ 3.4 Vectors in R n................................... 4.5 Vector Algebra.................................. 5 Lengths, Angles, and the Dot Product 6. Vector Lengths and Unit Vectors....................... 6. Angles Between Vectors in R 3......................... 6.3 Dot Products................................... 7 3 Lines and Planes 9 3. Vector Representations of Lines........................ 9 3. Planes....................................... 3.3 Lines and Planes in R n............................. 3.4 Example: Finding the Equation of a Plane.................. 3 3.5 Example: Intersection Point Between a Line and a Plane.......... 3 About This Document These notes are a modified version of content from the open textbook Linear Algebra by Jim Hefferon, which is placed under a Creative Commons License Creative Commons Attribution-ShareAlike.5 License.
Vectors in R n You may be thinking that Vectors in R n sounds exotic. It is exotic. It is both interesting and eye-opening. But it is not distant or unreachable. Some students in this course may already have been exposed to vectors in R n in previous courses. But it might be that not all students are familiar with all the notation and definitions we will need at the start of our linear algebra course that deal with n-dimensional vectors. And so, the first chapter of these notes introduces the notion of a vector in R n.. Vectors A vector is an ordered list of numbers. For example, 5 is a vector with three elements. The elements can represent real-world data, such as exam scores, RGB colours from a photograph, and so on.. The Length and Direction of a Vector The length and direction of a vector are concepts we use throughout our linear algebra course. To describe these concepts, we begin by defining a one-dimensional space to be R. We can represent this space with a single axis.
Now choose a point on the axis to label, and another point to label. To find the point matching +. on this axis, we start at and head in the direction of, and go.7 times as far. The basic idea here is that we are introducing the concepts of length and direction. These concepts are helpful throughout our linear algebra course, particularly at the end of the semester, when we explore orthogonality. We can draw a vector as having some length and pointing in some direction. There is a subtlety in the definition of a vector as consisting of a length and a direction. The two vectors below are equal, even though they start in different places. The two vectors are equal because they have equal lengths and equal directions. Again: those vectors are not just alike, they are equal. How can things that are in different places be equal? Think of a vector as representing a displacement (the word vector is Latin for carrier or traveler). These two squares undergo displacements that are equal even though they start in different places..3 The Relationship Between Points and Vectors There is a relationship between points and vectors that we will use many times in our linear algebra course. The vector that extends from the point (a, a ) to the point (b, b ) can be denoted as as ( ) b a b a For example, the two over and one up arrow, 3
would be the vector ( ) We often draw the arrow as starting at the origin, and we then say it is in the canonical position (or natural position or standard position). When ( ) v = is in canonical position, then it extends from the origin to the endpoint (v, v ). v v.4 Vectors in R n We can extend or concept of a vector to R 3, or to even higher-dimensional spaces, with the obvious generalization: the vector that, if it starts at the point (a,..., a n ), ends at the point (b,..., b n ), is represented by the column vector b a b a. b n a n The above vector has n elements, and is therefore a vector in R n, R n = v v. v n v,..., v n R Note also that, as before, two vectors are equal if they have the same representation. Also note that the symbol simply means in, or element of. 4
.5 Vector Algebra For scalar c R, and vectors v and w, ( ) ( ) v = v v, w = w w we define scalar multiplication and vector addition as follows, ( ) ( ) ( ) ( ) ( v c v v w c =, v + w = + = v c v v w v + w v + w ) We can understand these operations geometrically. For instance, if v represents a displacement, then 3 v represents a displacement in the same direction but three times as far. And ( ) v represents a displacement of the same distance as v, but in the opposite direction. And if v and w represent displacements, then v + w represents those displacements combined. The long arrow is the combined displacement in this sense: imagine that you are walking on a ship s deck. Suppose that in one minute the ship s motion gives it a displacement relative to the sea of v, and in the same minute your walking gives you a displacement relative to the ship s deck of w. Then v + w is your displacement relative to the sea. Another way to understand the vector sum is with the parallelogram rule. Draw the parallelogram formed by the vectors v and w. Then the sum v + w extends along the diagonal to the far corner. 5
Lengths, Angles, and the Dot Product. Vector Lengths and Unit Vectors The length of a vector v R n is defined as the square root of the sum of the squares of its components. v = v + + v n This is a natural generalization of the Pythagorean Theorem. For any nonzero v, the vector v/ v has length one. We say that dividing v by v normalizes the vector v to length one. Vectors with length one are referred to as unit vectors.. Angles Between Vectors in R 3 We can use the idea of lengths to obtain a formula for the angle between two vectors. Consider two vectors in R 3 where neither is a multiple of the other (the special case of multiples will turn out below not to be an exception). They determine a twodimensional plane - for instance, put them in canonical position and take the plane formed by the origin and the endpoints. In that plane consider the triangle with sides u, v, and u v. Apply the Law of Cosines: u v = u + v u v cos θ where θ is the angle between the vectors. The left side gives (u v ) + (u v ) + (u 3 v 3 ) = (u u v + v ) + (u u v + v ) + (u 3 u 3 v 3 + v 3) while the right side gives us (u + u + u 3) + (v + v + v 3) u v cos θ 6
Canceling squares u,..., v 3 and dividing by gives a formula for the cosine of the angle, cos θ = u v + u v + u 3 v 3 u v If we need the angle between the two vectors, we can use ( ) θ = cos u v + u v + u 3 v 3 u v.3 Dot Products To extend the concept of an angle between vectors in R n, we cannot draw pictures as above. But we can instead make the argument analytically. First, the form of the numerator of Equation () comes from the middle terms of (u i v i ). This motivates our definition of the dot product. The dot product (or inner product) of real-valued vectors in R n is u v = u v + u v +... + u n v n Note that the dot product of two vectors is a real number, not a vector, and that the dot product is only defined if the two vectors have the same number of components. Note also that dot product is related to length: u u = u u + + u n u n = u With this generalization, the angle between vectors in R n can be defined as ( ) u v θ = arccos u v Vectors from R n are orthogonal, that is, perpendicular, if and only if their dot product is zero. They are parallel if and only if their dot product equals the product of their lengths. () () (3) Example These vectors ( ) ( ), are orthogonal. The dot product between them is zero: ( ) ( ) = ()() + ( )() = 7
Example The angle between the two vectors 3, is ( ) ( ) ()() + ()(3) + ()() arccos + + 3 = arccos + 3 + 3 This is approximately.94 radians. Notice that these vectors are not orthogonal. 8
3 Lines and Planes 3. Vector Representations of Lines Having introduced points and vectors in R n, we next turn to lines. Given a point P that is on a line, and a vector v that is parallel to the line, the vector representation of the line can be represented by L = P + t v The vector P is the vector that, in canonical position, ends at point P. Example in R In R, the vector equation of line, L, that passes through points (, ) and (3, ) is ( ) ( ) L = + t, t R (4) Why would this represent a line? First, note that for certain values of t, we obtain the two given points that our line passes through: when t =, Equation (4) gives us the the vector that, in canonical position, ends at the point (, ). when t =, Equation (4) gives us vector that, in canonical position, ends at the point (3, ). For any other values of t, we have points that are parallel to the vector ( ) In other words, different values of t corresponds to different points on the line L. We can also express our line, L, using set builder notation: {( ) ( ) } + t t R Either description is an expression of line L, depicted below. 9
Example in R 3 The line, L, that passes through points (,, ) and (, 3, ), is Notice that the vector L = + t in canonical position gives the location of one of the given points on the line, and the vector is a vector parallel to the line that can be calculated from the two given points. Again, we can express the line L in set notation as the set of (endpoints of) vectors of the form + t t R. In R 3, a line uses one parameter so that a particle on that line would be free to move back and forth in one dimension. A diagram of our line in R 3 is shown below.
3. Planes Suppose that plane M passes through a point P (x, y, z ), and is normal to the nonzero vector n = Then M is the set of all points, P(x, y, z), for which the vector P P is orthogonal to n. In other words, if both P and P correspond to points in the plane, then the vector P P is parallel to the plane. Thus, the dot product n P P =. This equation is equivalent to = n P P A = B C x x y y z z A B C = A(x x ) + B(y y ) + C(z z ) D = Ax + By + Cz, where D = Ax + By + Cz The equation Ax + By + Cz = D is the component equation of the plane M. Notice that the coefficients of the variables x, y, and z give us the components of the normal vector to the plane. We can also represent a plane with set-builder notation. A line in R 3 involves one parameter. A plane in R 3 involves two parameters. For example, the plane through the points (,, 5), (,, 3), and (, 4,.5) consists of (endpoints of) the vectors in the set 3 { + t + s 4 t, s R} 5 8 4.5
The two vectors associated with parameters t and s are parallel to the plane. They can be determined from these calculations. 8 = 3 5, and 3 4 4.5 = 4.5 As with the line, note that we can describe some points in this plane with negative values of t, or negative values of s, or both. Calculus books often describe a plane by using a single linear equation. For example, this linear equation represents a plane: x + y + z = 4 To translate from this equation to a vector description, we can think of this as a oneequation linear system and parametrize. The linear equation can be written as x = y/ z/ 5 or x y z = + y / + z / 3.3 Lines and Planes in R n Generalizing, a set of the form { p + t v + t v + + t k v k t,..., t k R} where each of the vectors are in R n, v,..., v k R n and k n is a k-dimensional plane. For example, π L = 3 + t, t R.5
is a line in R 4, and is a plane in R 4, and 3.5 + t + r + s, t, s R + s + t, r, s, t R is a hyperplane in R 4. Again, the intuition is that a line permits motion in one direction, a plane permits motion in combinations of two directions, etc. 3.4 Example: Finding the Equation of a Plane Suppose we want to find the equation of the plane that passes through P( 3,, 7) and is perpendicular to vector n = Let Q(x, y, z) be a point in the plane. Then PQ is a vector parallel to the plane. Thus, n and PQ are perpendicular. = n PQ = 5 5 5x + y z = x + 3 y z 7 Note that the coefficients of our plane equation are the components of n, and vice versa. We can use this to quickly identify the equation of a normal vector to a plane. 3.5 Example: Intersection Point Between a Line and a Plane Line L passes through points P(,, ), and Q( 3,, ). Find the point, if any, where L intersects the plane x + 4y z =. We can begin by expressing line L in vector form. 3
PQ = 3, L(t) = The equation of our line gives us the expressions + t 3 x = 3t, y = t z = t Substituting these expressions into the equation of our plane gives us a linear polynomial in t. x + 4y z = ( 3t) + 4(t) ( t) = t = Using t =, we can obtain the point where the line intersects the plane. x = 3() = 6, y = () = 4, z = = The point where the line meets the plane is ( 6, 4, ). 4