A point in the *xy*-plane is represented by two numbers,
(*x, y*), where *x* and *y* are the coordinates of the
*x*- and

It consists of three coefficientsAx + By + C= 0

wherey = m x + b

The line equation has three coefficients; but, there are only two
*independent* ones. That is, given a line equation, dividing
the equation by one of its non-zero coefficients will not change the line.
For example, the line equation 4*x*+5*y*+7=0 is equivalent to
*x*+1.25*y*+1.75=0 and 0.8*x*+*y*+1.4=0. Dividing an
equation by a non-zero constant is usually referred to as
*normalization*. There is one normalization that is very important to us.
It is used to compute the distance between the origin to a line.

Suppose the line equation is *Ax+By+C*=0, the distance between the origin
and the line is given as follows:

Thus, after normalizing the line equation by dividing it with the square root
of the sum of the squares of *A* and *B*, the absolute value of
the new constant term is the distance between the origin and the given line.

they are parallel to each other if their slopes are equal. Since the slopes areAx + By + C= 0

Ex + Fy + G= 0

Note that we can assume thatAF=BE

Two lines are perpendicular if and only if the product of their slopes is -1. With the line equations above, two lines are perpendicular to each other if and only if the following holds:

AE=-BF

It consists of four coefficientsAx + By + Cz + D= 0

The normal vector of a plane is its gradient. The gradient of an equation
*f(x,y,z)*=0 is defined as follows:

For a plane, its normal vector is simply <*A, B, C*>.

Unfortunately, a line in space cannot be represented with a single equation. However, it can be considered as the intersection of two planes. To ease our discussion, we shall switch to using vectors, although this traditional notation is still very useful.

A vector is similar to a point. If it is a vector in the plane
(*resp.*, space), it has two (*resp.*, three) components.
Thus, a vector in a *n*-dimensional space has *n* components.
For our applications, we shall distinguish two types of vectors:
*position* vectors and *direction* vectors. A position vector
gives the position of a point. More precisely, a point is a vector.
A direction vector gives a direction. Hence, it is not a point.
In what follows, position vectors and direction vector are written with
boldface upper case and lower case, respectively. For example, **A** and
**a** are position and direction vectors, respectively. In many
cases, such distinction is unnecessary.

As you have learned in linear algebra or in calculus, you can add and subtract vectors; but you can only multiply or divide a vector with constants.

The length of a vector is the square root of the sum of squares of all
components. A *unit-length* vector is a vector whose length is one.
A vector can be *normalized* by dividing its components with its
length, converting the given vector to a unit-length one while
keeping its direction the same. For example, if **a**=<3, 4, 5>, then the
length of **a**, usually written as |**a**|, is SQRT(50) and the
normalized **a** is <3/SQRT(50), 4/SQRT(50), 5/SQRT(50)>.

The geometric meaning of the inner product of **a** and **b** is
the following:

More precisely, the inner product ofa.b= |a|.|b|cos(t)

- If
**a**.**b**is zero, where**a**and**b**are non-zero vectors, then cos(*t*) must be zero and, as a result,*t*must be 90 degree. Therefore,**a**and**b**are perpendicular to each other. - If
**a**.**b**is equal to the product of lengths of**a**and**b**, the cosine of*t*is 1 and*t*is 0 degree. As a result,**a**and**b**are parallel to each other and point to the same direction. - If
**a**.**b**is equal to the negative product of lengths of**a**and**b**, the cosine of*t*is -1 and**a**and**b**are parallel to each other but point to opposite directions.

whereB+td

X.n-B.n= 0

Given the vector notation of lines and planes, it is very easy to compute
the intersection point of a line and a plane. Let the given line be
**A**+*t***d**. Let the plane be defined with a base point
**B** and its normal vector **n**. Then, this plane has equation
**X.n=B.n**. If the line intersects the plane, there must be a value of
*t* such that the corresponding point lies on the plane. That is,
there must be a *t* such that the point corresponding to this
*t* would satisfy the plane equation. Since a point on the line is
**A**+*t***d**, plugging **A**+*t***d** into the plane
equation yields

(Rearranging the terms and solving forA+td).n-B.n= 0

Therefore, plugging thist= (B-A).n/d.n

In the above, if **d.n** is zero, *t* cannot be solved and
consequently no intersection point exists. The meaning of
**d.n** = 0 is that **d** and **n** are perpendicular to each other.
Since **n** is the normal vector of a plane and **d** is perpendicular
to **n**, **d** must be parallel to the plane. If the line is parallel
to the plane, no intersection point exists.

where **a** = < *a*_{1}, *a*_{2},
*a*_{3} >, **b** = < *b*_{1},
*b*_{2}, *b*_{3} >, and **| |** is a 2-by-2
determinant. In other words, the cross product is

The cross product ofa×b= <a_{2}b_{3}-a_{3}b_{2}, -(a_{1}b_{3}-a_{3}b_{1}),a_{1}b_{2}-a_{2}b_{1}>