lines

Lines and vectors

Before delving deep into the relationship of lines and vectors, there are key differences that you should know when comparing the two:

Line   \ \leftrightarrow

Vector   \ \rightarrow

Lines are bi-directional

Vectors are uni-directional

A line is infinite and extends in both direections

Vectors are finite in magnitude

Lines have a definite location

Vectors have no fixed location

Two ines are the equal if they have the same direction and same location

Vectors are the equal if they have the same direction and magnitude

You can describe a line using vectors, and that is what we will explore in some of the equations below.

Vector equation of a line

In a 2D setting (or R \mathbb {R} ), to describe a line in terms of vectors, we need one vector that represents a point on the line and another vector used to describe the direction of the line instead of the slope.

r=r0+tmor(x, y)=(x0, y0)+t(m1, m2) \vec {r} = \vec {r_0} + t \vec{m} \quad \text {or} \quad (x, \ y) = (x_0, \ y_0) + t(m_1, \ m_2)

Where:

  • tR t \in \mathbb {R}

  • r=(x, y) \vec {r} = (x, \ y) is a position vector at any point on the line.

  • r0=(x0, y0) \vec {r_0} = (x_0, \ y_0) is a position vector at some point on the line.

  • m=(m1, m2) \vec {m} = (m_1, \ m_2) is a direction vector parallel to the line.


For a line in R3 \mathbb {R}^3 , the vector equation would be in the form (x, y, z)=(x0, y0, z0)+t(m1, m2, m3) (x, \ y, \ z) = (x_0, \ y_0, \ z_0) + t(m_1, \ m_2, \ m_3)


Here is what the vector equation (x, y)=(1, 1)+t(1, 1) (x, \ y) = (-1, \ 1) + t(1, \ 1) looks like compared to the line y=x+2 y = x + 2 :

No description
  • The vector r0 \vec {r_0} represents a point on y=x+2 y = x + 2

  • The vector m \vec {m} represents the slope m=m2m1=11=1 m = \frac {m_2} {m_1} = \frac {1} {1} = 1

Parametric equations of a line

The parametric equations of a line are equations formed from the individual coordinates of the vectors of the vector equation of a line.

From the vector equation (x, y)=(x0, y0)+t(m1, m2) (x, \ y) = (x_0, \ y_0) + t(m_1, \ m_2) , we get:

x=x0+tm1andy=y0+tm2 x = x_0 + t m_1 \quad \text {and} \quad y = y_0 + t m_2

No description

If the line is in R3 \mathbb{R}^3 , you also have z=z0+tm3 z = z_0 + t m_3 .

Cartesian equation of a line

The cartesian (or scalar) equation of a line is what you already know: y=mx+b y = mx + b , but with a twist!

You must rearrange the equation and multiply it by the common denominators to get an equation of the form:

Ax+By+C=0 Ax + By + C = 0

AA, BB and CC must be whole numbers, and n=(A, B, C) \vec {n} = (A, \ B, \ C) is the normal vector to the line. The normal vector is a vector that is perpendicular to another.


Here's the graph of the cartesian equation 3x+4y8=0 -3x + 4y - 8 = 0 looks like compared to its graph y=34x+2 y = \frac {3} {4} x + 2 :

The vector $ \vec {n} = (A, \ B) = (-3, \ 4) $ is the normal vector to the line
The vector n=(A, B)=(3, 4) \vec {n} = (A, \ B) = (-3, \ 4) is the normal vector to the line

Again, if the line is in R3 \mathbb {R}^3 , the equation would be in the form Ax+By+Cz+D=0 Ax + By + Cz + D = 0

Example: Vector to cartesian

Convert the vector equation of the line r=(3, 5)+t(1, 4) \vec {r} = (3, \ -5) + t(-1, \ -4) to its cartesian form by:

a) Using the vector equation

b) Using the parametric equations

answer

a) We can use the point r0=(3, 5) \vec {r_0} = (3, \ -5) , as well as calculate the slope using m=(1, 4) \vec {m} = (-1, \ -4)

m=m2m1=41=4 m = \frac {m_2} {m_1} = \frac {-4} {-1} = 4


Now, substitute these values into the equation of a line:

yy0=m(xx0) \quad \quad \quad \, y - y_0 = m(x - x_0)

y(5)=(4)(x3) \quad \quad y - (-5) = (4)(x - 3)

 y+5=4x12 \quad \quad \quad \ \, \, y + 5 = 4x - 12

4x+y+17=0 -4x + y + 17 = 0


\therefore The cartesian equation of the line is 4x+y+17=0 -4x + y + 17 = 0


b) We can use the vector equation r=(3, 5)+t(1, 4) \vec {r} = (3, \ -5) + t(-1, \ -4) to form the following parametric equations:

x=3t x = 3 - t

y=54t y = -5 - 4t


Now, rearrange for tt:

t=3x t = 3 - x

t=5  y4 t = \frac {-5 \ - \ y} {4}


Finally, plug the equations into each other to get the cartesian equation:

 5  y4=3x \quad \quad \quad \ \, \frac {-5 \ - \ y} {4} = 3 - x

   5y=124x \quad \quad \ \ \ -5 - y = 12 - 4x

   4xy17=0 \ \ \ 4x - y - 17 = 0

4x+y+17=0 -4x + y + 17 = 0


\therefore The cartesian equation of the line is 4x+y+17=0 -4x + y + 17 = 0

Example: cartesian to vector form

Convert the cartesian equation of the plane x+2yz+6=0 x + 2y - z + 6 = 0 to:

a) Its vector form

b) Its parametric equations

answer

a) To convert to vector form, we need one point, and two direction vectors.


We can get a point by selecting a value for two variables, and solving for the other.

Say x=0 x = 0 and y=0 y = 0 , then:

 x+2yz+6=0 \quad \ \, x + 2y - z + 6 = 0

(0)+2(0)z+6=0 (0) + 2(0) - z + 6 = 0

z=6 \quad \quad \quad \quad \quad \quad \quad \, \, z = 6

So, the point (0, 0, 6) (0, \ 0, \ 6) is on the plane.


To get the two direction vectors, we need to use the plane's normal vector:

n=(1, 2, 1) \vec {n} = (1, \ 2, \ -1)


We can use the dot product to generate vectors that are perpendicular to the normal. These vectors are the direction vectors of the plane.

a(1)+b(2)+c(1)=0 a(1) + b(2) + c(-1) = 0 where (a, b, c) (a, \ b, \ c) is a direction vector for the plane.


If a=1 a = 1 , b=0 b = 0 and c=1 c = 1 : (1)(1)+(0)(2)+(1)(1)=11=0   (1)(1) + (0)(2) + (1)(-1) = 1 - 1 = 0 \ \Rightarrow \ So d1=(1, 0, 1) \vec {d_1} = (1, \ 0, \ 1)

If a=0 a = 0 , b=1 b = 1 and c=2 c = 2 : (0)(1)+(1)(2)+(2)(1)=22=0   (0)(1) + (1)(2) + (2)(-1) = 2 - 2 = 0 \ \Rightarrow \ So d2=(0, 1, 2) \vec {d_2} = (0, \ 1, \ 2)


Combining the information we just calculated, we get the vector equation:

π=(0, 0, 6)+s(1, 0, 1)+t(0, 1, 2) \vec { \pi } = (0, \ 0, \ 6) + s(1, \ 0, \ 1) + t(0, \ 1, \ 2)


\therefore The plane's vector equation is π=(0, 0, 6)+s(1, 0, 1)+t(0, 1, 2) \vec { \pi } = (0, \ 0, \ 6) + s(1, \ 0, \ 1) + t(0, \ 1, \ 2)


b) The parametric equations can be derived from the vector equation we just obtained:

x=s x = s

y=t y = t

y=6+s+2t y = 6 + s + 2t

Symmetric equation of a line in 3D

Note that the vector equation of a line in R3 \mathbb {R}^3 is (x, y, z)=(x0, y0, z0)+t(m1, m2, m3) (x, \ y, \ z) = (x_0, \ y_0, \ z_0) + t(m_1, \ m_2, \ m_3)

Well, we can rearrange the parametric equations for tt:

x=x0+tm1  t=x  x0m1,m10 x = x_0 + t m_1 \ \Rightarrow \ t = \frac { x \ - \ x_0 } { m_1 }, m_1 \ne 0

y=y0+tm2  t=y  y0m2,m20 y = y_0 + t m_2 \ \Rightarrow \ t = \frac { y \ - \ y_0 } { m_2 }, m_2 \ne 0

z=z0+tm3  t=z  z0m3,m30 z = z_0 + t m_3 \ \Rightarrow \ t = \frac { z \ - \ z_0 } { m_3 }, m_3 \ne 0


Now, we just equate them to get the symmetric equation:

x  x0m1=y  y0m2=z  z0m3wherem10,m20,m30 \frac { x \ - \ x_0 } { m_1 } = \frac { y \ - \ y_0 } { m_2 } = \frac { z \ - \ z_0 } { m_3 } \quad \text {where} \quad m_1 \ne 0, m_2 \ne 0, m_3 \ne 0