- 1 Vectors, and Vector Functions
- 2 Coordinate Systems
- 3 Limits of Multivariate Functions
- 4 Partial Derivatives
- 5 More About Coordinate Systems
- 6 Problems
Vectors, and Vector Functions
A vector is a mathematical object which has magnitude like a number, but also direction. For example, if I wanted to describe how a person is driving at any particular time, I would need two numbers: their speed, and some measure of their direction (the angle it makes with true north, for example). These two quantities together constitute the motion vector of that person.
We also use vectors to describe position: for example, to locate an object, it suffices to know how far it is from you, and in what direction.
Vectors are the bread and butter of multivariable calculus because they pack multiple variables into a single, easily manipulated quantity. Let's look at some more specific examples.
In our first descriptions, we used a coordinate system you should be familiar with call "polar coordinates." If you aren't familiar with this system, we will review them shortly. When using Cartesian coordinates, vectors are very, very familiar. The point (x,y) has a position vector, or put more simply, is the vector written . See illustration at right. Unlike variables which may be numbers, like etc., vectors are usually written or . While the latter is common in print and online, we will use the former since it is more easily duplicated in handwriting.
In three dimensional space we use three variables to write down a vector. In Cartesian coordinates, this would look like .
We can, if we wish, talk about just the length of the vector - this is its absolute value, or . For a vector written in Cartesian coordinates, the Pythagorean theorem tells us this is just .
Vectors can be added and subtracted, just like numbers. See the illustration below.
In Cartesian coordinates, this is particularly easy: and .
Multiplication by a number is also simple: the vectors direction is unchanged, but its length is multiplied by that number. Again, in Cartesian coordinates, this becomes simple: .
There are two ways to multiply a vector by another vector. In two dimensions, we can perform only one, which is called the dot product or in more advanced terminology, inner product. Given two vectors, this dot product is how far one vector goes in the direction of the other, using the other as the "unit" of length. It is defined , where is the angle between and . As before, this takes a particularly simple form in Cartesian coordinates: . This expression is similar for the three dimensional case: .more general concept). It is called the cross product and written . The cross product is defined as having length equal to the area of the parallelogram borderd on two sides by and , and direction perpendicular to either vector, with a right handed orientation. This means that if we take our right hand, point the palm in the direction of , bend our knuckles so that they point in the direction of , then our thumb is already pointing in the direction of . This definition is not easy to calculate with, and shortly we will introduce a more convenient way of calculating these kinds of products.
While we often write to describe a vector, we often find it more convenient to define three vectors and , unit vectors which point along the positive and axes, respectively.
With these vectors, we can write our original vector . It means exactly the same thing as , but is a little friendlier to the printed page. As an additional notational convenience, we often write , since keeping track of all the 's and 's would get unwieldy very fast if we are working with several vectors.
As we are about to see, these conveniences can make the calculation of the cross product relatively simple. Hopefully, the student will remember the definition of the determinant of a matrix, because this will make calculating cross products much, much easier. For those who are unfamiliar with the idea, we will review the concept.
For a matrix , we define the determinant to be . To compute the determinant of a larger square matrix, then, we choose any row of the matrix and take the left entry, and multiply that number by the determinant of the matrix formed by eliminating the first row and column of the original matrix. From this, we subtract the next entry in our row times the matrix formed by eliminating THAT row and column of the original matrix. Then we add the next term, and so on and so forth until we have a complete expansion.
Below is an example of this technique, expanding along the first row.
Examine this equation, and make sure you understand how each of the matrices on the right hand side were formed. Once we have reached this point, we can use our definition of a 2x2 determinant to arrive at a value.
We now arrive at a means of calculating the cross product of two vectors. It turns out that the definition we gave of cross product amounts to
Normally, we don't allow vectors (like ) to be elements of a matrix or a determinant, but in this case, we make an exception because the formula is so useful and easy to remember. We will encounter a similar exception to the rules when we give an easy way to remember the formula for curl.
In this course, we will frequently switch between the notations and without discussion of the switch: constantly keep in mind that these are all ways of saying the same thing.
Vector Functions and Vector Fields
Before, we described scalar functions as taking a point in space and ascribing a number to it - for example, . With our new notation, we can describe this as , which is a scalar function written with vectors.
There is another class of functions, though, which return not numbers but vectors. Mathematicians define a function as anything that maps some set (the "domain") to some set (the "range".) For the functions we have seen so far, the range is the real numbers (scalars.)
When the range is a vector space, it can be called a vector function. But the most common types of vector functions are those for which the domain is physical space. In that case, the function is called a vector field.
Vector fields are useful for describing many phenomena, most notably flows, winds, heat dispersion, and electric and magnetic forces. For example, at every point in the ocean, the water is moving with both a speed and a direction. If we have some vector which can be used to describe points in the ocean, we can write a function , which will give us the velocity vector of the water at . Very often, we use as a variable vector describing a position or location, for velocity, and later we'll encounter for acceleration.
We're all very familiar with the Cartesian coordinates in two dimensions, and once the student has learned the "right hand rule" and committed it to memory, they have learned all there is about the Cartesian system in three dimensions.
Hopefully, the students will be familiar with polar coordinates as well, but we shall review.
In the plane, it is frequently useful to describe shapes, not by their distance along two axes, but by their straight-line distance to a point, and their angle to a fixed line. We use instead of the usual , where is the distance and is the angle.
We can easily move between Cartesian and polar coordinates with these equations:
Cylindrical coordinates are just polar coordinates, with a z-axis. They are frequently useful for describing phenomenon which have circular motion in a plane, but are moving in some direction (like a spiral).
More common than cylindrical coordinates are spherical coordinates, which use distance from a center point together with "latitude and longitude" to describe points in three dimensional space.
In the spherical coordinate system, a point is described with its distance to a central point, , the angle made in the plane between the points projection into that plane and the x-axis , and the angle made between the point and the z-axis .
As with polar coordinates, there are equations which allow us to transfer between spherical and Cartesian coordinates.
Limits of Multivariate Functions
- See the limit article.
The limit of a multivariate function is almost identical to the single-variable limit in concept, but complicated by the realization that (x,y) can approach the target point from any direction, not just the left or right hand sides.
The definition is not dissimilar from the single-variable case. The limit of a function is defined so that if, for any tiny little number you can think of, there is some distance such that every point within of is taken by the function to a number within of .
Nevertheless, the kinds of phenomenon we see in the multivariate case is very different. Note that while it is still possible to define a limit from a direction, we don't bother to do so - unlike the one-variable case when a one-sided deriative told us half of the functions behavior at a point, in higher dimensions such a limit tells us almost nothing. Indeed, the only kind of phenomenon that these kinds of limits are capable of describing are "point discontinuties," which can be "fixed" just be defining the function to be the limit at that point.
- See the proof page for details.
When dealing with functions of more than one variable, one has to be careful about what a "derivative" is. The operative concept is the partial derivative, which is the derivative of the function with respect to a given argument while holding all the other arguments constant. It is written like a derivative, but with a different "d" character.
Here are some other notations for partial derivatives that one might encounter. We won't use them.
One can take higher-order partial derivatives as well, such as
A question that arises is: do mixed partial derivatives commute? That is, do we have:
The answer is yes, if the derivatives are continuous. In problems that arise in practice, the derivatives are always continuous, and switching derivative order is a staple of work in multivariate calculus.
More About Coordinate Systems
The study of various coordinate systems (sometimes called "curvilinear coordinate systems") is central to the subject of multivariable calculus. You are already familiar with some of the common coordinate systems such as polar coordinates in 2 dimensions, and spherical or cylindrical coordinates in 3 dimensions. In this section we will examine the general topic of coordinate systems, and how one can perform calculations—involving vectors, surfaces, integrals, and so on—directly in specialized coordinate systems. Physical problems can often be solved more easily in a coordinate system that matches the symmetries of the problem.
An extremely important consideration to be aware of is that geometrical or physical phenomena (points, vectors, regions, surfaces, etc.) have a fundamental existence and meaning that is independent of any coordinate system. Coordinate systems simply give us ways to attach numbers to them. Different coordinate systems will attach different numbers to a given vector field, for example, but the vector field has an underlying geometric meaning that does not change. The various vector field operations have an underlying geometrical or physical meaning, and coordinate systems simply let us perform mathematical calculations on them.
You have already seen the notion of "geometrical universality" in the definitions of the dot product and the cross product. They were given purely geometrical definitions that can be visualized without regard to any coordinate system. Than, for any Cartesian coordinate system, these operations were defined in terms of the components of the vectors in that system, and it was shown that those results matched the purely geometrical definitions. What we are going to do next is develop the tools to define vectors, and the dot product and cross product, in any coordinate system at all. Later, we will introduce new operations—the divergence, the curl, and various integrals, and show how to calculate them in any coordinate system.
For example, Stokes' theorem makes a very powerful geometric statement about integrals of various vector fields over very general surfaces and lines. The concepts appearing in the theorem are purely geometric, and therefore independent of the coordinate system. Once we know how to manipulate those concepts (vector fields, integrals, and the "curl" operator) in any coordinate system, we will be able to choose a coordinate system that makes the surface simple. Specifically, we will change from the usual x/y/z Cartesian system to a u/v/w system for which the surface is defined by holding w=0. (Another way of looking at this is that the surface has been "parameterized" in terms of parameters u and v.) Once this is done, we will be able to calculate the curl operator, perform the integration, and prove Stokes' theorem in the u/v/w system.
As another example, Maxwell's equations make statements about the curl and divergence of the electric and magnetic field. While the formulas for curl and divergence are simpler in Cartesian coordinates than in spherical, some problems, such as the electric field in the vicinity of a point charge, have symmetry that makes spherical coordinates more natural. When we work out the divergence theorem in spherical coordinates, we will be able to solve problems of this sort.
We will use "u" and "v" in many of our general examples of alternative coordinate systems in 2 dimensions, and u, v, and w in 3 dimensions. For the very common cases of polar coordinates in 2 dimensions and spherical in 3 dimensions, we will often use the more familiar r/ or r//.
We always have the coordinates of each system representable as functions of the other. For example, the transformation between polar coordinates and Cartesian coordinate is this:
In spherical coordinates:
Much of what happens in multivariable calculus involves the partial derivatives of the coordinates in one system with respect to the coordinates in the other. It is very useful to represent these as a matrix:
Or, going in the other direction:
This is the derivative matrix of the transformation from one coordinate system to the other. It is often called the Jacobian matrix, though some authors use the term "Jacobian" specifically to refer to the matrix's determinant. To avoid any confusion on this point, we will always put square brackets around matrices, and use absolute value signs to denote determinants.
The notation for the Jacobian matrix of u/v/w in terms of x/y/z is written:
More generally, it is:
and the determinant is:
For polar coordinates, the Jacobian matrices are:
Working these out, we have
with determinant r, and:
with determinant 1/r.
An interesting theorem is that these matrices are inverses of each other. (It follows that their determinants are reciprocals of each other.)
Exercise: Prove that the matrix product of the J matrices of two sequential coordinate changes is the J matrix of the combined change. That is, if
are two coordinate changes, so that
is the result of doing both, then
Hint: This is really just the chain rule for partial derivatives. The adding up of terms in the chain rule is the same as the adding up of products in a matrix multiplication.
It follows from this that, if the second change is just the inverse of the first, bringing us back to the original coordinate system, the two matrices are inverses.
The coordinates should always be chosen such that the Jacobian determinant is positive. If it isn't, exchange the order of two of the coordinates. This ensures that the coordinate system is "right handed". (Or more precisely, that it has the same handedness as the Cartesian system.) As an example, the coordinate order (r/) is correct for polar coordinates; (/r) is not. The order (r//) is correct for spherical coordinates; (r//) is not.
The Jacobian determinant must not be zero. (Equivalently, the Jacobian matrix must not be singular.) The astute reader will notice that this means that polar coordinates don't work at the origin, and spherical coordinates don't work at the north and south poles.
Vectors in Arbitrary Coordinate Systems
Having gotten the preliminary concepts out of the way, we next examine what vectors, and vector operations such as the dot product, look like in arbitrary coordinate systems.
A vector has different components in different coordinate systems. (It's still the same vector, of course.) If the components of the vector , in the u/v/w coordinate system, are:
and, in the standard Cartesian system the components are:
then the transformation rule is:
In other words, the transformation of vector components from x/y/z to u/v/w is just a matrix multiplication by the Jacobian matrix
To go the other way, multiply by the matrix
We make a simplification to avoid having our notation get completely out of control. In keeping with our goal of expressing everything just in terms of the new coordinate system:
- The matrix that we have been calling [J(x, y, z / u, v, w)] we will call just [J]. That is, [J] for a coordinate system means [J(Cartesian/the coordinate system under discussion)].
- The matrix that goes the other way, formerly called [J(u, v, w / x, y, z)] we will call . It's just the inverse of the first matrix.
We will call [J] the "Jacobian of the coordinate system".
- The astute reader will notice that this is not a good definition. [J] depends on the choice of the "reference" Cartesian system, so we're not justified in calling it just "the Jacobian". But it turns out that it won't make any difference. We will always get the same answers, no matter what reference system we used. See the exercises.
For polar coordinates in two dimensions, we have:
And, going the other way:
Let's look at some vectors whose components are given in general coordinates—there are some important and striking aspects of this.
In polar coordinates, a "radial basis vector" at any point has components:
Its Cartesian components (from the formulas above) are:
The actual (Cartesian) direction in which the vector points depends on its location. It always points radially outward. Its length is . So the radial basis vector is a unit vector.
The "angular basis vector" has components:
Its Cartesian components are:
It always points "laterally", at right angles to the radial direction. More surprisingly, its length is . The angular basis vector is not a unit vector! It is bigger when farther away from the origin, even though the sum of the squares of its components is 1. In general curvilinear coordinates, the "square root of the sum of the squares of the components" rule is not correct for the length of a vector. The correct rule will be given below.
The Dot Product in Arbitrary Coordinates
We need a better formula for the dot product than the rule that works for Cartesian coordinates:
Given two vectors and , described in a u/v/w coordinate system, we can find their dot product by converting to Cartesian coordinates and using the simple rule that we know, which is the sum of the pairwise products of the vector components. This means that, at least momentarily, we will have to keep track of the vectors' components in both the Cartesian system, which we have been calling , , and , and in the new coodinate system, which we have been calling , , and . To do the required matrix manipulations, we have to give the components numbers instead of names. Things like , , and are just too unwieldy. So we will make this simplification:
- The components of a vector in the new coordinate system (formerly , , and ) will just be called , , and .
- The components of a vector in the "reference" Cartesian system will be written with a tilde: , , and .
Once we reformulate the rules for vectors in terms of the coordinate system of interest, we will only use , , and (or , , and ), and we will never have to look at another tilde again.
We can now calculate the dot product of and , from their components and the Jacobian. We know that
in terms of the components in the reference system. We also have the transformation rule in terms of the Jacobian matrix.
This is just matrix multiplication. The summation is from 1 to 3, or whatever the dimension is.
By our new convention, this is just the Jacobian matrix [J], so
As promised, no more tildes!
We can combine the two Jacobians into one matrix, and then use that whenever we need a dot product. Let:
That is, [g] is just the matrix product of the transpose of [J] and [J] itself.
This is the rule for the dot product in general coordinates. The matrix [g] is called the metric tensor or just the metric. We will have occasion to use its determinant, which we will call just g. Actually, its square root is more commonly used.
For those who really like equations that express things in terms of matrix multiplication, this could be written as:
The first vector is written in the form of a row instead of the more traditional column. This gives a 1xN matrix times am NxN matrix times an Nx1 matrix, which is a 1x1 matrix. The single value in that matrix is the dot product.
To review what we have for two popular systems, in 2-dimensional polar coordinates:
For spherical coordinates in 3 dimensions (we will need these soon):
So, in polar coordinates:
or, going back to giving the coordinates names:
In spherical coordinates:
The metric is always a symmetric matrix. (Exercise: Prove this. Use the definition in terms of and .) For all coordinate systems that have the coordinate lines crossing at right angles everywhere (which includes all the common systems), the metric is a diagonal matrix—the only nonzero items are on the main diagonal.
The Length of a Vector in Arbitrary Coordinates
The length of a vector (sometimes called the "norm") is the square root of the dot product of the matrix with itself. Note that this is defined in terms of something that we have defined in a purely geometrical way, independent of any coordinate system. Note also that it is consistent with our earlier definition of the dot product of two vectors as the product of their lengths, times the cosine of the angle between them.
The length of a vector is usually written with a sort of double absolute value sign.
In polar coordinates, we have:
In spherical coordinate:
The Cross Product in Arbitrary Coordinates
The rule for the cross product in the general u/v/w coordinate system makes use of all the things we have been developing. First, make a vector from the determinant with basis vectors (in the u/v/w system!) across the top, the way we did previously:
If the coordinate system is Cartesian, we are done. Otherwise, apply the inverse of [g] to it, and then multiply by . (Remember that just "g", without brackets, is the determinant of the matrix.)
In the case that [g] is a diagonal matrix, this can be simplified. [g] is a diagonal matrix for any "orthogonal" coordinate system, that is, one in which the coordinate lines always cross at right angles. This is true for all common coordinate systems, including polar, spherical, and cylindrical, so we will frequently make use of this simplification.
If is diagonal, the only nonzero elements are , , and . The only nonzero elements of are , , and . In this case, the cross product formula is:
In spherical coordinates, this becomes:
Example: Suppose is a radial basis vector:
(The length of is 1.) Let be a -pointing basis vector:
(The length of is r.) is a vector at the surface of a sphere of radius r that points "south", tangential to the surface. points outward from the surface, that is "up". and are orthogonal. (Prove it; calculate .)
By the formula for the cross product, we have:
This points "east" at the surface of the sphere of radius r, is perpendicular to the other two vectors, and has length r, which is the product of the lengths of the other two vectors. The geometrical properties of the cross product (perpendicular to each of the given vectors, and of length equal to the product of their lengths times the sine of the angle between them) are obeyed. The cross product, like all other vector operations, is a geometric invariant. It doesn't matter what coordinate system was used to calculate the components—the answer is the same.
The Divergence in Arbitrary Coordinates
The divergence and curl will be discussed in detail in lecture 6. But, to give a flavor of how the [g] metric matrix is used, we give the definitions here.
Here's the definition of the divergence operator in arbitrary curvilinear coordinates:
(The second form follows from the first due to the product rule for derivatives.) In practice, it's not as forbidding as it looks, for vector fields that are well suited to the particular coordinate system.
- Need to put in some examples, etc. I have them worked out, but typing them in is tedious.
The Curl in Arbitrary Coordinates
Here's the definition of the curl operator in arbitrary curvilinear coordinates:
First, to find the curl of a vector field , let the matrix operate on , yielding :
- Special case: If the coordinate system is orthogonal, so that is diagonal, this is very easy:
Then the curl is:
- Or, if the coordinate system is orthogonal:
- Need to put in some examples, etc. I have them worked out, but typing them in is tedious.
1. Find an antiderivative of
2. Find the Taylor series of at 0. What do you notice about this sum?
3. Sketch level curves of in the xy plane.
4. Describe the level surface of .
1. If and , find . Moving to three dimensional space now, what can you say about before you even compute it? Carry out the computation. Was your prediction correct?
2. Let . Find a spherical coordinate expression for .
3. Let . Describe in words. Find a formula for in Cartesian coordinates.
4. Find the partial derivatives and of
5. Find the partial derivatives and of .
1. Prove that the geometric definition of matches our coordinate expression.
2. Prove that the geometric definition of matches our coordinate expression.
3. Suppose has continuous derivatives of all orders. Prove .
- Some textbooks use a definition of vector components such that basis vectors always have length 1. Such a treatment imposes the requirement that the coordinate lines be perpendicular everywhere. The formulas for vector operations are more complicated and less elegant when this is done.
- This is a well known notational problem in multivariable calculus. It is one of the reasons why tensor algebra textbooks are so hard to read.