I’m learning linear algebra and specifically linear algebra and the dot product. Please help me and explain the following chapter on lines step by step for my notes. Menu
5:33PMk cMd
3.6.1 Lines
Throughout this
book, straight
Iines will mostly
be used, and
therefore, the shorter term line is
often used instead. A straight line can
be described with a starting point, s,
and a direction, a, as illustrated to the
right. To describe a line, it may be
convenient to have a representation
that can find all possible points on
the line. First, start with the point, p,to the right, and create a vector from s to p, i.e., sp. If p is located on the line,described by s and , then ss must be parallel to a. In fact, a scalar,, must exist which makes  exactly as long as s, which is expressed as
sP=tid.
(3.55)
Since p is located in the direction of a,
we also know that t>o. For , which
also lies on the line, there is another scalar, w, which satisfies: so-td. Since g is located in the opposite direction of d, it is clear that t<o. For r, on the other hand, there is no scalar, t, that
satisfies a similar relation. That is,
SA4ta for all values of.. The only
difference between p and o is that they use different scalars, and . Hence, it makes sense that any point on the
line can be described by using a
particular scalar, . Therefore, we use
r() to denote a function of a scalar, t,
which returns a point, p. That is, for
different values of , different points, p
5:35PMisMd
Menu
satisfies a similar relation. That is,
sa+ta for all values of. The only
difference between p and o is that they use different scalars, , and . Hence, it makes sense that any point on the
line can be described by using a
particular scalar, -. Therefore, we use
 to denote a function of a scalar,t,
which returns a point, p. That is, for
different values of, different points,p
, will be generated. This expression
can be rewritten as
SP(t=td
P(t)-S=td
P(t)=S+td.
(3.56)
Note that all points, ro, on the line are
described by starting at s and then
adding a scaled direction vector, i, to reach rw. Some examples: Po)-s, P1)=s+d,and p{-2.5)=s-2.. This type of
parameterized line is summarized in
the following definition.
Definition 3.6: A Parameterized Line A line parameterized by tei can be described by a starting point, s, and a direction vector, a. All points, r, on a line can be described by
P(t) =S+td.
Note that a/0, otherwise, only a
(3.57)
single point, s, will be generated (i.e.,
no line).
One often says that the line above is
on explicit form, which simply means that the points, po, on the line can be generated directly from the
expression. Lines on explicit form in
one, two, and three dimensions can
5:36PM心FM
one, two, and three dimensions can be found in Interactive Illustration 3.15 below.
3.15
P(t)
Backward
Reset
Forward
Interactive Illustration 3.15: This interactive illustration shows lines on the form: P(t) = S + td. Note
that the slider can be influenced in order to change the value of t, which in turn alters the point,
P(t). First, a line is shown in one dimension, which here is assumed to be the x-axis. The starting
point, S, of the line can be moved, and in addition, the length of the direction vector, d, can be
Nanged. Notice what happens to the speed of the point, P, when the length of d changes and the
slider is pulled. Click Forward to see a two-dimensional line
Note that taking the length of both sides of a line, P()-s=t, gives p()-sl=ltdl.When the line direction is
normalized, i.e., iai-1, then x/-|P()-s.
This can be very useful when
computing intersections between, for example, a line and a sphere, as will be seen in Section 3.7.
Recall that a two-dimensional point, s,
5:36PM心8M
Recall that a two-dimensional point, s,
has two scalar components (s), and
similar, a two-dimensional vector, a
has two scalar components, (a,,). Now,
note that a two-dimensional line,
Po)-s+ta, can be expressed in terms of its scalar components of the vectors and points as
py(t)=sy + tdy.
(3.58)
The following gives a taste of Chapter
5 on Gaussian elimination. Take the
top row above and multiply by a, and
multiply the bottom row by a.. This
leads to the following, where the
parameter  has been dropped fromp.
and for clarity purposes,
swd, + dzdyt
(3.59)
From algebra, it is known that a term can be subtracted from an expression as long as the same term is subtracted on both sides. Hence, it is legal to
subtract the bottom row from the top
row, which leads to
Pady-Pyds =szdy-syds+drdyt-dadyt = szdy -syd.
dypz-dsPy + sydz -8zdy =0,
and as can be seen, the -terms have
disappeared from the expression.
This can further be rewritten as
dypa-drPy+sydz-szdy=0
apa+bpy +c=0,
where a=d,,o=-a., and c=sd.-s,,. This
equation may be familiar to some,and especially, if we use.- andy-w,which gives
ax +by+c=0.
For +0, one can further rewrite the
(3.60)
(3.61)
(3.62)
5:36PMisMe
For 40, one can further rewrite the
expression above as y=(-ax-c)/6= ke+m,
where k--a/ and m--c/. This expression of a line is definitely familiar to most people, where . describes how muchy changes when . is increased by 1, and m is the ,-value at a=o. Note, however,
as +lute=o, is a more general description
of a two-dimensional line, since it
makes it possible to describe vertical
lines as well, which is not possible
with y=k+m.
It is important to note that the
implicit form of the line, ap. +o, te=o, and
the explicit form of the line, P()=5+t,
describe the same line exactly, since the former expression was derived from the latter. Next, we will show that if the basis is orthonormal, the explicit form can be rewritten using dot products. For that purpose, we
introduce n=(m,my)=(a,b)=(a,-a,),which leads
to
dyPz-doPy +sydz-Szdy =0
n·(P-S)=0,
(3.63)
where p-(p) and s-(). Here we have
used the fact that (d,-d.).(PB)=d,p. +(-4,)m.
when vectors ard described in an orthonormal base, as described in Theorem 3.4. As can be seen, if we
take the vector from s to any point, p,on the line, then its dot product with.must be zero if p is to be on the line.
Interestingly, we see that n.d-(a,-d.).(d,a,)-a,ys -asa, = o, i.e., n is orthogonal to the line direction, a. Therefore, n is often called the normal of the line. Note also, that
5:36PM哈sM
the normal of the line. Note also, that
n.(p-s)-o is said to be in implicit form,
since it does not easily generate points on the line. However, it is straightforward to test whether a point, p, lies on the line.
This leads to the following definition of a two-dimensional line on implicit form.
Definition 3.7: Two-dimensional Implicit
Line
A line can be represented on
implicit form by using a starting
point, s, and a normal vector, . All
points, p, on a line can then be
described by
n·(P-S)=0.
(3.64)Note that n0, otherwise, all points, p,lie on the line.
It should be noted that Definition 3.7
still holds in the case of a non-
orthogonal basis. That is, the line can
still be written as n.(p-s)=o where n is a
normal vector to the line. However, it
is no longer straightforward to
calculate the coordinates of , since,
in general, it is no longer equal to
n=(dy,-d.).
As seen above, there are two
different types of mathematical
representations for two-dimensional lines. The same cannot be done for a one-dimensional or three-
dimensional line. However, as will be
seen in Section 3.6.2, a three-
dimensional plane equation has two
seen in Secuon 3.6.2, a tnree-
dimensional plane equation has two
similar representations, both an
implicit and an explicit.
Returning to two-dimensional lines on the form: n.(p-s)-o, which says that all points p that lie on the line,
represented by  and a, fulfil the
expression above, i.e., the dot product is equal to zero. What happens if pis not on the line? Well, the dot product will not be zero, of course, but can
something else be read into that
result? It turns out it can be quite
useful. To demonstrate this, a scalar
function, e, of p is created as
e(P)=n.(P-S)
This function is sometimes called
(3.65)
edge equation (in computer graphics)
or signed distance function (this is
explained later in this section). Since,cp) is defined using a dot product, it is known from Section 3.4, that e(p) is
positive when the angle n. p-si<m/2, that e(p) is negative when in.p-s>m/, and that e(pj=o only when .p-s-m/2. However,ep)=o also means that p lies on the line
defined by s and a. Therefore, when
e(p)>o, we say that p is in the positive
half-space of the line, and when ep)<0, p
is in the negative half-space, i.e., the
line divides the entire two-
dimensional plane into two half-
spaces. This is shown in Interactive
Illustration 3.16.
Menu
e(p)-o only when in.p-sl-m/2.However,e(p)-o
also means that p lies on the line
defined by s and a. Therefore, when
e(p)>o, we say that p is in the positive
half-space of the line, and when e(p)<o, p
is in the negative half-space, i.e., the
line divides the entire two-
dimensional plane into two half-
spaces. This is shown in Interactive
Illustration 3.16.
e(P)=0.13
Interactive Illustration 3.16: The edge equation, e(P) = n· (P - S) is visualized here. Recall that the ine is represented by a starting point, S, and a normal vector, n, both which the reader can move around by clicking/touching and moving while pressing. Note that the line, where e(P) = 0, is
dashed in this illustration. The circles with plus and minus signs in them show which side of the line is the positive and negative half-space. In particular, the reader is encouraged to move the point P so that it lies exactly on the dashed line, and at the same time, keep an eye on the calculation for e(P)in the bottom left corner. Furthermore, the reader should move P so that it is located in the positive half-space of the line, and into the negative half-space. As a final exercise, it is possible normalize n.i.e., make sure that n|| = 1, by remembering the definition of the dot product, and make sure that p - S coincides with n. Once n = 1, e(P) will show the orthogonal, signed distance from th
dashed line to P.
5:36PMis8MJ...
With help from the Definition 3.1 (dot
product), Equation (3.65) can be
rewritten as
e(P)=n.(P-S)=|n|||P-S||cos[n,P-S].
Note that p-s|coln,p-s is actually the
(3.66)
orthogonal distance from p to the line,with the caveat that the "distance" is signed. This means that if p is in the positive half-space, then signed
distance is positive, and if p is in the
negative half-space, the signed
distance is negative. Also note that ifn
is normalized, then cp is exactly the
signed orthogonal projection distance
function, i.e., e(P)= |P-Sllcos(n, p-sl.
Example 3.8:
Study the line that passes through the point s-(1, and has normal n=(3,4).What is the distance from the point
p-(w, to the line? What is the distance
from p-(,) to the line?
In the previous paragraph we saw
that the distance could be calculated
using the signed distance function
e(p)=n·(p-s). In the discussion we also
saw that the signed distance
function can be written in the so
called affine form
e(P)=n.(P
(3.67)
In this particular example we get
(3.68)