Packet 02

Tutorial: Vectors in 2D and 3D

Vector space: addition and scaling

A vector is an element in a vector space, which is a collection of objects for which someone has defined operations of addition and scaling:

Vector space operations

  • is a vector when
  • is a vector when

Properties of vector operations

  • Commutativity:
  • Associativity:
  • Distributivity:
  • Zero vector:

The elements also satisfy intuitive properties like: and and

Scalars Scalars (“scale-ers”) could in theory be taken in any field, for example complex numbers, but in this class we use real number scalers .

Components of vectors

In weeks 1–4 we consider vectors in the plane , and vectors in space . Much of applied linear algebra involves generalizing the theory to vectors in where is a very large number, but we don’t start doing that until week 5.

Vectors in are ordered pairs with . Vectors in are ordered triples with .

Addition is componentwise: Scalars act simultaneously across all components:

Standard basis vectors These special vectors have their own symbols:

In there will be standard basis vectors as well:

Components Usually the terminology ‘component of a vector’ refers to one of the numbers in the ordered sequence or . Sometimes ‘component’ refers to the basis vector scaled by this number, e.g. .

Notice that we always have , which explains why ‘component’ is sometimes used in this second way.

Other bases It is possible to select a different set of special vectors, e.g. , having the property that any vector can be written uniquely as a ‘linear combination’:

Any such set is called a basis, and the in this case are called components in the basis .

(The ‘unique’ aspect means that the coefficient numbers are determined once the vector is determined.)

Geometric vectors

It is possible to consider vectors geometrically as quantities with direction and magnitude in space. (Provided one has defined space purely geometrically, which nobody does.)

150 400

Dot product

The vector space (any ) comes with a type of product called inner product or dot product or scalar product. Every inner product satisfies basic rules of products: Algebraic properties of every inner product

Component definition of the standard dot product The dot products for and are defined using components:

Norm The dot product of a vector with itself gives the square of a number called the norm or length or magnitude:

The terminology “length” is justified by the Pythagorean Theorem in : 300

Exercise 02-01

Parallelogram identity

Let and . Compute and and and . Verify that:

Geometry

The dot product is a scalar number that provides information about the geometric relationship between vectors:

Cosine rule for dot products

where is the angle between and .

Derivation of cosine rule for dot products

The rules for dot product imply that:

On the other hand, the Law of Cosines for the triangle with sides gives:

It is worth noticing that the inner product can be computed entirely in terms of the norm:

Orthogonality and dot product

The cosine formula for dot product has qualitative geometrical consequences:

  • If then and are orthogonal (perpendicular vectors)
  • If then and form an acute angle
  • If then and form an obtuse angle
  • If then and are parallel
Question 02-01

Orthogonality by hand

Determine which pairs of and and are orthogonal.

Question 02-02

Dot product via unit vectors

Compute the dot product of and .

Exercise 02-02

Angle between vectors

Find the angle between and .

Exercise 02-03

Acute, orthogonal, or obtuse?

Are the angles between and and obtuse or acute?

Unit vectors A vector with is called a unit vector. So, are unit vectors.

Thinking geometrically, a unit vector carries the information of direction. We could call unit vectors ‘direction vectors’ instead.

Any vector can be renormalized to create a unit vector by dividing out its length:

Some texts, especially in physics, use the notation instead of for the unit vector that points in the direction of .

Projection The dot product is a quantity telling how much one vector aligns with another. The dot product of two unit vectors is where is the angle between them.

One can use the dot product to find the components of a vector in the standard basis. Suppose is any vector. Then , so:

More generally, one defines the projection of along (projection along the direction of ) using the dot product:

The scalar coefficient is called the parallel component of along . (Or, sometimes, is called the component.)

The projection points in the direction of , and it says how much of lies in that direction.

Another vector called the perpendicular component is given by subtracting the parallel part:

It is called ‘perpendicular’ because:

250

Exercise 02-04

Projection by hand

Let and .

  • (a) Find the projection of to the direction of .
  • (b) Write the vector in terms of parts parallel and perpendicular to .

Cauchy-Schwarz inequality The Cauchy-Schwarz inequality says that for any vectors , , we know:

Exercise 02-05

Cauchy-Schwarz

Prove the Cauchy-Schwarz inequality using the angle formula.

The Cauchy-Schwarz inequality is very important in math. There is a version of this inequality in many other settings where it is harder to prove.

Triangle inequality The Triangle inequality says that for any vectors , , we know:

Exercise 02-06

Cauchy-Schwarz Triangle

Prove the Triangle inequality using the Cauchy-Schwarz inequality by “foiling” after writing it using the dot product.

Exercise 02-07

Orthogonality identity

Suppose that vectors and satisfy . Show that they must be orthogonal. (Hint: use the “foiling” trick in the previous exercise.)

Lines and planes using vectors

Lines Given a point identified with a vector and a direction vector , the line through in direction is given parametrically by the formula:

Given two points and , the line passing through these two points is given parametrically by:

The line segment from to corresponds to . The point may be considered to be a weighted average of and with weights and .

Planes The scalar equation of a plane in gives a plane as the set of points satisfying a single linear equation, such as:

Other formulations of this equation can display more meaning. A plane is determined by the vector equation of a plane by the data of a single point through which it passes, together with a normal vector that is perpendicular to the plane. Such an equation of a plane can be formed by simply stating that vectors in this plane emanating are perpendicular to :

If we have components and and , then this formula can be rewritten as:

This equation implies that the , , in the linear equation of the plane are just the components of its normal vector .

The normal vector of a plane is also useful for computing angles with respect to the plane. For example, the angle between two planes (the angle formed at their intersection) is equal to the angle between their normal vectors. (There is a Problem about this.)

Finally, a plane can be described parametrically by giving the component functions of a parametric surface, such as with components . Each component function must be a linear function of and . The parametric surface can also be described using vectors by giving one vector that identifies a point through which the plane passes along with two additional vectors and lying in the plane:

400

Question 02-03

Vector plane from scalar plane

Find the vector equation of a plane with scalar equation .

Question 02-04

Parametric plane from vector plane

Find a parametric equation of the plane passing through having normal vector . (Hint: write the equation for a vector from that lies in the plane, and solve it to find two example vectors.)

Exercise 02-08

Line and plane intersection

Find the point at which the plane and the line intersect.

Spans

Suppose we are given two vectors . The span of these vectors is the 2D plane of vectors given by all possible linear combinations for any . Sometimes the span is written using angle brackets:

This set of vectors forms a plane passing through the origin .

400

Question 02-05

Is it a span?

Consider the plane . Is this plane the span of two vectors?

The span of three vectors covering all of : 400

Example

Span of two vectors in

Problem: Suppose and . Describe in vector form. Solution: By the definition, we have:

To write this in vector form, we can use the cross product to find a vector perpendicular to both and :

Then in vector form the equation is , or in scalar form it is .

Cross product

The cross product is a vector perpendicular to both and . If and , then is the vector given in components by:

(The cross product is not very important for this class and will not be tested in exams, but it is very useful in 3D geometry for finding perpendicular vectors, and it will be required in the homework.)

Independence

A vector is dependent on the vector if there is an equation for in terms of alone:

We say is independent of if there is no such equation.

Because in the condition, any dependency can be rewritten as the opposite dependency: if , then . So is dependent on if and only if is dependent on , and we will also just say is a dependent set of vectors.

The span of a single non-zero vector is a line, while the span of two independent vectors is a plane. However, the span of two dependent vectors is still a line!

A vector is dependent on a set of two vectors if there is an equation for in terms of and using linear combinations:

(Of course, if both , this so-called dependency actually says .)

Notice that “ is dependent on ” is true exactly when , which is to say, when lies in the plane determined by and .

The set of three vectors is said to be a dependent set when at least one of them is dependent on the others. This fact is equivalent to the truth of some equation:

where the coefficients are not all equal to zero. The set is an independent set when there is no such equation; which is to say, any equation would have .

Distances

Point to point The distance between and (more accurately, between the point identified by and that identified by ) is .

Point to line The vector from a point to a line , namely to the point on the line closest to , is given by taking the vector from to and removing the component parallel to :

The distance from to is then .

Projection gives minimal distance

One can verify the formula for by minimizing the squared distance from to using the standard calculus technique of minimizing a function by setting its derivative equal to zero.

Point to plane The vector from a point to the plane through with normal vector (that is, to the nearest point on the plane) is given by projecting onto , that is:

So the distance from to this plane is:

Exercise 02-09

Distance between parallel planes

Find the distance from the plane given by to the parallel plane given by .

Problems due 29 Jan, 12:00pm

Problem 02-01

Line of intersection between planes

Find a parametric equation for the line formed as the intersection of the two planes and . What is the angle between these planes?

Problem 02-02

Span

Find for the scalar equation of a plane which is equal to , where and .

Problem 02-03

Independence

Is this a dependent set of vectors?:

Problem 02-04

Distance point to line

Find the distance from the point to the line given by .