# Equation of the line passing through $(3,-2,-5)$ and $(3,-2,6)$

Find the Cartesian equation of the line passing through $(3,-2,-5)$ and $(3,-2,6)$ in $3$D.

The equation of the line through the points $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ is given by $$\vec{r}=\vec{a}+\lambda(\vec{b}-\vec{a})$$ where $\vec{a}=x_1\hat{i}+y_1\hat{j}+z_1\hat{k}$ and $\vec{b}-\vec{a}=(x_2-x_1)\hat{i}+(y_2-y_1)\hat{j}+(z_2-z_1)\hat{k}$ $$\frac{x-x_1}{x_2-x_1}=\frac{y-y_1}{y_2-y_1}=\frac{z-z_1}{z_2-z_1}$$

For the line through the points $(3,-2,-5)$ and $(3,-2,6)$ is $$\lambda= \boxed{\frac{x-3}{0}=\frac{y+2}{0}=\frac{z+5}{11}}$$

Is it the correct solution and how do I make sense of the final equation of the line through the given points ?

• There can't be a single equation for a line in dimension $3$. Commented Jul 29, 2018 at 9:03
• @Bernard Its 2 equations really. Commented Jul 29, 2018 at 9:28
• @Sorfosh: Yes, of course, but the O.P. was about the equation… Commented Jul 29, 2018 at 9:30
• ofcause its two equations. but my doubt is in the equation there is 0 in the denominator, and how do I make sense of it ? Commented Jul 29, 2018 at 9:31

I don't think we should divide by zero.

Observe the first two coordinates of the points.

They satisfy $x=3$ and $y=-2$.

The line is the intersection of $x=3$ and $y=-2$.

The formula is only used when $x_1 \ne x_2$, $y_1 \ne y_2$, and $z_1 \ne z_2$.

• thats whr my doubt is. how do we justify dividing by 0 in the equation ? Commented Jul 29, 2018 at 9:25
• hmm.. we dont' divide by zero. If the values are the same in $x$ coordiante, we know the lines falls on $x=x_0$. Commented Jul 29, 2018 at 9:29
• I think the problem is you do not understand where the equation of the line comes from. Your goal is to eliminate the parameter $t$, so you really just do nothing if the constant in front of it is $0$ Commented Jul 29, 2018 at 9:30
• This article might be of your interest, notice that they impose the condition that denominator is non-zero. Also, the article later describe what to do when the values are equal in a particular dimension. Commented Jul 29, 2018 at 9:49
• Yes, $x=3, y=-2$. Books are written by humans. Not everything that is written is correct. Commented Jul 30, 2018 at 3:33

Set $A=(3,-2,-5)$, $B=(3,-2,6)$. As any point on the line $(AB)$ is a barycenter $\lambda A+(1-lambda)B$ of $A$ and $B$, the coordinates of a point $M$ of this line are obtained by projections on the axes of this relation: \begin{cases} x_M=\lambda\cdot 2+(1-\lambda)2=2, \\ y_M=\lambda(-3)+(1-\lambda)(-3)=-3,\\ z_M=-5\lambda+6(1-\lambda)=6-11\lambda. \end{cases} This is a parametric representation, and we see that $z_M$ can take any real value, so the cartesian equations are: \begin{cases} x=2, \\ y=-3. \end{cases}

In $2$-D, how would you find the line passing through $(3,-5)$ and $(3,6)$? Note that the formula $$\frac{x-x_1}{x_2-x_1}=\frac{y-y_1}{y_2-y_1} \ \ \text{or} \ \ \frac{x-x_1}{y-y_1}=\frac{x_2-x_1}{y_2-y_1}$$ shows the slope of the line. Thus: $$\frac{x-3}{y+5}=\frac{0}{11} \Rightarrow x-3=0 \Rightarrow x=3.$$ Indeed, it is a vertical line $x=3$ ($y$ can be any value).

Similarly, the line passing through $(3,-2,-5)$ and $(3,-2,6)$ is a vertical line $x=3,y=-2$ ($z$ can be any value).

By your work $\vec{(0,0,1)}$ is parallel to the line, which gives the answer: $$(x,y,z)=(3,-2,-5)+t(0,0,1).$$

You have $$x=3, y=-2$$

For $z$ may use parametric form $$z=-5+11t$$

Thus your equation is $$r(t) = (3,-2,-5+11t)$$

To make sense of the Division by 0, we have to first see the derivation of this formula to understand what the denominator actually means in this formula.

Lets say, we need to write the function for the line $$l$$ and we have been given that the line passes through a fixed point $$A$$ and is parallel to vector $$\vec B$$ .

Now, let $$\vec a = \vec {OA}$$

Put the tail of $$\vec b$$ on $$A$$

We have $$\vec r = \vec a + \lambda\vec b$$ such that the tip of $$\vec r$$ always lies on line $$l$$.

If we write our results in cartesian form, where

$$\vec r = x \hat{i}+y \hat{j} + z\hat{k}$$

$$\vec a = x_1 \hat{i}+ y_1 \hat{j} + z_1\hat{k}$$

$$\vec b = a \hat{i}+b \hat{j} + c\hat{k}$$

Here, $$(x_1, y_1, z_1)$$ is the given point through which $$l$$ passes and $$(a, b, c)$$ are direction ratio of $$\vec b$$.

Putting these in the previously derived equation,

$$\lambda=\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}$$

This formula can be modified if two points are given since the direction ratio of the line passing through $$(x_1, y_1, z_1)$$ and $$(x_2, y_2, z_2)$$ would be just the difference of respective coordinates i.e $$(x_2-x_1, y_2-y_1, z_2- z_1)$$. So you just replace $$(a, b ,c)$$ with these coordinates to get your formula.

As you can see here, the denominators are actually the direction ratio of $$\vec b$$. So when you get

$$\lambda= \boxed{\frac{x-3}{0}=\frac{y+2}{0}=\frac{z+5}{11}}$$

what it actually means is that direction ratio(or cosine) of $$\vec b$$ along $$X$$ and $$Y$$ axis is $$0$$.

Remember direction cosine is actually the cosine of the angle made by a vector with the 3 axes.

So in this case, your

$$\boxed{cos(\alpha) = cos(\beta) = 0}$$

i.e $$\boxed{\alpha = \beta = \frac{\pi}{2}}$$

So that would mean your line $$l$$ would make $$90°$$ with $$X$$ and $$Y$$ axis respectively.

Note that this does not mean that your line would be the $$Z$$ axis. Your line $$l$$ could be any line which which is perpendicular to the $$XY$$ plane.

From the given points you can try to visualise that $$l$$ will intersect $$XY$$ plane perpendicularly at point $$(3, -2, 0)$$