3-D Geometry Notes
3-D Geometry Notes
3-D Geometry Notes
3. Distance Formula. The distance between two points P (a1 , b1 , c1 ), Q(a2 , b2 , c2 ) is given by
q
d(P, Q) = |P Q| = (a2 − a1 )2 + (b2 − b1 )2 + (c2 − c1 )2 .
4. Inequalities. An inequality like ax + by + cz < d describes all points on one side of the plane
ax + by + cz = d. If we change < to >, then we get the other side.
5. Cylinders. A general surface is given by an equation of the form f (x, y, z) = c where c is some
constant. If the expression f (x, y, z) is missing one of x, y, z, then the resulting surface is seen
to be a cylinder (with some possibly complicated base) parallel to the axis corresponding to the
missing variable.
It is not necessary for a variable to be missing, but this can be arranged after a change of variables!
Vectors
1. Basic Vector Calculations.
Typically, vectors in Euclidean spaces <n appear as n-tuples of real numbers. Thus a plane vector
looks like < 3, 4 > and three dimensional vector looks like < −2, 3, 7 > . etc.
To add two vectors, they must be of the same length and then we add them componentwise.
1
We can also scale a vector by multiplying it by a number c and so such numbers are called scalars.
The operation is called scalar multiplication.
Thus 4 < 1, 2, 3 >=< 4, 8, 12 > ..
These two operations can be combined to make new vectors.
2 < 1, 2, −2 > −3 < 1, 0, 2 >=< −1, 4, −10 > .
These concepts can be generalized to abstract vector spaces, studied in Linear Algebra. We will
discuss them but not clutter these notes with the abstract concepts.
2. Geometry Associated With vectors.
A vector < 1, 2 > may be interpreted as a “displacement” of 1 unit in the x-direction followed by
2 units in the y-direction. Thus, if we start at the point A(−2, 5) and apply the displacement,
then we reach B(−1, 7) since we see that −2 + 1 = −1 and 5 + 2 = 7. So, we could express our
−→
vector as a displacement from A to B, described in symbols as AB =< 1, 2 >.
By a slight abuse of notation, we shall write
−→
AB = B − A =< 1, 2 >
.
It is evident that many different point pairs will give the same vector and geometrically these
different point pairs can be imagined as obtained by moving an arrow stretched from A to B
anywhere in the plane without changing its direction.
The vector addition can now be interpreted by saying
−→ −−→ −→
AB + BC = AC.
If we multiply a vector v by −1, then it is clear that we simply reverse the arrow
−→ −→
(−1)AB = −(B − A) = A − B = BA.
More generally multiplication by c multiplies the length by |c| and reverses the direction exactly
when c < 0.
3. General Vectors. More generally, vectors model quantities which have a built in direction and
magnitude. A formal mathematical definition stipulates that a vector space is a non empty set
with a concept of addition and scalar multiplication satisfying certain natural axioms. 1
Another typical interpretation, besides displacement, is forces acting on object.
1
We list these axioms without much explanation. You should consult a book on linear algebra for more information.
• The addition is commutative, has a “zero” and negatives.
• The scalar multiplication is unitary. 1v = v.
• There are natural identities:
(u + v) + w = u + (v + w), v + 0 = v, c(d(v)) = (cd)v, c(u + v) = cu + cv, (c + d)u = cu + du.
2
4. Standard bases. It is customary to name some special vectors:
5. Dot Product. We mentioned that vectors have magnitudes. What is magnitude (length) of a
vector? If we think of the vector as a displacement, then it should the the distance between the
starting and ending points.
Thus we may write
−→
|AB| = d(A, B).
Our distance formula then yields
√
| < a, b, c > | = a2 + b 2 + c 2 .
In abstract vector spaces, the above formula is interpreted as giving a definition of the angle
between two vectors, whereas in ordinary Euclidean spaces, it can be deduced from Euclidean
Geometry.
u · v = v · u, u · (v + w) = u · v + u · w, cu · v = (cu) · v = u · (cv)
and moreover
u · u ≥ 0 where equality happens exactly when u = 0.
Then u · u defines the square of an abstract length and the above formula defines and angle between the vectors. The
u·v
fact that |u||v| is the cosine of an angle is guaranteed by the famous Cauchy-Schwartz inequality!
3
v
(a) Let v be a non zero vector. Then either of the two vectors ± |v| is a unit vector. These
are said to be unit vectors parallel to v (along v) if we use the plus sign and antiparallel
(opposite v) in the case of the minus sign.
v·w
(b) The angle between two vectors v, w is computed as arccos( |v||w| ). Note that the vectors need
to be non zero for this to make sense.
(c) v · w = 0 iff the angle between them is π/2 radians, or one of them is a zero vector. This
becomes a very effective test of perpendicularity of two vectors.
(d) |v · w| = |v||w| iff the vectors are either parallel or antiparallel, or one of them is zero.
(e) (av + bw) · h = (a)v · h + (b) · h.
(f) Given non zero vectors v, w, we can ask for a vector of the form v −cw which is perpendicular
to w. this is easily found by solving
(v − cw) · w = v · w − cw · w = 0
v·w
and gives c = w·w . Note that this answer makes sense since w is a non zero vector.
The vector cw is parallel (or antiparallel) to w and is seen to give the foot of the perpendicular
from tip of v onto the line containing w. This is called the projection of v on w.
This is a very useful operation with many applications. Note that it is valid in any dimen-
sions!
w
(g) If we note that u = |w|
is a unit vector along w, then we can write the projection as:
! ! !
v·w v·w v·w w v·w
projw v = w= w= = u.
w·w |w|2 |w| |w| |w|
We define the quantity v·w|w|
to be the component of v along w and denote it as compw v.
This is also denoted as “the scalar projection” of v on w.
(h) Note that for a vector v =< x, y, z >, we can interpret
x = compi v, y = compj v, z = compk v.
This is a generalization of polar coordinates to three space and it can be extended to any
dimensions.
Note the identity deduced from v · v = |v|2 , namely
1 = cos2 (α) + cos2 (β) + cos2 (γ).
3
This characterizes all possible triples of direction angles.
3
All this can be generalized to abstract higher dimensional vector spaces with a proper notion of inner (dot) products.
4
7. The Cross Product. In three dimensions only, there is another concept of a product of
vectors. Given two vectors
v = a1 i + b1 j + c1 k and w = a2 i + b2 j + c2 k,
Note that the formula has a pleasing symmetry and the determinant form is useful in remembering
it.
8. A simple Observation.
Given any vector u = a0 i + b0 j + c0 k it is easy to verify that
a0 b0 c0
u · (v × w) = (b1 c2 − b2 c1 )a0 + (c1 a2 − c2 a1 )b0 + (a1 b2 − a2 b1 )c0 = a1 b1 c1 .
a2 b 2 c 2
The last determinant makes it clear that if u = pv + qw for any scalars p, q, then u · (v × w) = 0.
4
So, our cross product v × w is always perpendicular to both v, w.
It is also evident that if v, w are linearly dependent, then v × w = 0 since all determinants in the
expression are zero.
Thus, when v, w are linearly independent (which means that their combinations fill out a plane),
then v × w is naturally a vector perpendicular to both v, w and in three space all such vectors
are multiples of a single non zero vector. Our cross product produces a natural vector with this
property.
It does a lot more.
We have:
•
|v × w| = |v||w|| sin(θ)| where θ is measured counterclockwise from v towards w.
This description needs a careful thought, since it depends on the direction in which we
observe the plane. The cross product, indeed, fixes a direction which can be defined as
naturally the “up” direction for this purpose.
This is often described as the “right hand rule” which says that if you hold your right hand
so that the index finger points along v and the middle finger along w, then the thumb gives
the direction of v × w. Of course, one has to draw the axes correctly so that i × j = k.
The formula |v||w| sin(θ) gives the signed area of the parallelogram formed from vectors v, w,
where we get a positive sign if the direction from v to w is counterclockwise as viewed from
up (i.e. in the direction of v) and negative if it is clockwise as viewed from up.
4
Here, for technical convenience, we consider a zero vector as perpendicular to any vector.
5
•
v × w = −w × v, v × (p + q) = v × p + v × q, c(v × w) = (cv) × w = v × (cw).
•
a0 b0 c0
u · v × w = u × v · w = a1 b 1 c 1
a2 b 2 c 2
in the above notation. Moreover this “triple product” is equal to |u||v||w| sin(θ) cos(α),
where θ is the angle from v towards w as explained above and α is the angle made by u with
the plane spanned by v and w.
It gives the volume of the parallelepiped with u, v, w as the corner vectors and it is a signed
volume, in the sense that it is positive exactly when the vectors are independent and u points
up from the v, w plane.
This last statement is often paraphrased as the “right hand rule” saying that if you hold
your right hand with the index and the middle finger in the direction of v, w respectively,
then the thumb can be made to point towards u without breaking your hand!
• Finally, we consider h = u × (v × w). Unlike the other triple product, here the answer
is more complicated. First we note that the h is a vector perpendicular to u as well as
v × w. Assuming independent vectors, we see that anything perpendicular to v × w must be
a combination of v, w, so the answer has the form
9. Lines in Space. A line is determined by two points P0 , P1 . Suppose that we take vectors
−→ −→
OP = r0 , OQ = r1 starting at the origin O with tips at P0 , P1 , respectively. Then it is not hard
to see that the vector pointing to a random point R on the line P0 P1 is given by
−→
OR = r = r0 + t (r1 − r0 ) .
Moreover, this parameter t can be taken as a coordinate on the line with P0 having coordinate 0
and P1 having coordinate 1.
If we are in three space and use coordinates x, y, z, then this can be described in a natural notation
by:
x = a0 + t(a1 − a0 ), y = b0 + t(b1 − b0 ), z = c0 + t(c1 − c0 ).
The boldness involves in allowing a zero denominator with the understanding that then
so is the numerator.
6
The same equation used in the plane gives a different way of finding an equation of a line through
P0 (a0 , b0 ), P1 (a1 , b1 ) as:
x − a0 y − b0
t= = or (b1 − b0 )(x − a0 ) = (a1 − a0 )(y − b0 ).
a1 − a0 b1 − b0
To be continued ...