How to Calculate the Distance Between Parallel Lines in Hesse Normal Form?

In summary, the conversation discusses the calculation of the distance between two parallel lines represented in Hesse normal form. The distance is determined by finding the perpendicular distance from each line to the origin and then taking the absolute value of the difference between these two distances. The orientation of the lines also affects the distance calculation. The conversation also touches upon the use of the Hesse normal form in solving such problems.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

Let $ax+by+c=0$ and $a'x+b'y+c'=0$ be the equations of two parallel lines $g$ and $g'$ in Hesse normal form. I want to calculate the between the two lines.

We have to pick a point of the line $g'$ and calculate the distance of that point and the line $g$, or not? (Wondering)

How can we use the Hesse normal form of the lines? (Wondering)
 
Physics news on Phys.org
  • #2
The line ax+ by+ c= 0 has a normal vector ai+ bj. Any line parallel to that must have normal vector a multiple of that: aki+ bkj so equation akx+ bky+ c'= 0.

A vector perpendicular to that is a multiple of bi- aj so a line perpendicular to ax+ by+ c= 0 must have equation bx- ay+ c'
'= 0 for some c''. Find the point at which bx- at+ c''= 0 intersects both ax+ by+ c= 0 and akx+ bky+ c'= 0. The distance between the lines is the distance between those two points.
 
  • #3
HallsofIvy said:
The line ax+ by+ c= 0 has a normal vector ai+ bj. Any line parallel to that must have normal vector a multiple of that: aki+ bkj so equation akx+ bky+ c'= 0.

A vector perpendicular to that is a multiple of bi- aj so a line perpendicular to ax+ by+ c= 0 must have equation bx- ay+ c'
'= 0 for some c''. Find the point at which bx- at+ c''= 0 intersects both ax+ by+ c= 0 and akx+ bky+ c'= 0. The distance between the lines is the distance between those two points.

Since $ax+by+c=0$ and $a'x+b'y+c'=0$ are the equations of the lines g and g' in Hesse normal form, do we have that the vectors $ai+bj$ and $a'i+b'j$ are unit, i.e., $\sqrt{a^2+b^2}=\sqrt{a'^2+b'^2}=1$ ? (Wondering) If yes, I have done the following:

From the equation $ bx- ay+ c''= 0$ we solve for $y$ and we get $y=\frac{b}{a}x+\frac{c''}{a}$.

We set it in $ax+ by+ c= 0$ and we get: \begin{align*}&ax+ b\left (\frac{b}{a}x+\frac{c''}{a}\right )+ c= 0 \Rightarrow ax+ \frac{b^2}{a}x+\frac{bc''}{a}+ c= 0 \\ & \Rightarrow a^2x+ b^2x+bc''+ ac= 0 \Rightarrow (a^2+ b^2)x+bc''+ ac= 0 \\ & \Rightarrow x=-(bc''+ ac)\end{align*}

The intersection point is $P_1=\left (-(bc''+ ac), \frac{b}{a}\left (-(bc''+ ac)\right )+\frac{c''}{a}\right )=\left (-(bc''+ ac), -\frac{b}{a}(bc''+ ac)+\frac{c''}{a}\right )$

We set it in $a'x+ b'y+ c'= 0$ and we get: \begin{align*}&a'x+ b'\left (\frac{b'}{a'}x+\frac{c''}{a'}\right )+ c'= 0 \Rightarrow a'x+ \frac{b'^2}{a'}x+\frac{b'c''}{a'}+ c'= 0 \\ & \Rightarrow a'^2x+ b'^2x+b'c''+ a'c'= 0 \Rightarrow (a'^2+ b'^2)x+b'c''+ a'c'= 0 \\ & \Rightarrow x=-(b'c''+ a'c')\end{align*}

The intersection point is $P_2=\left (-(b'c''+ a'c'), \frac{b'}{a'}\left (-(b'c''+ a'c')\right )+\frac{c''}{a'}\right )=\left (-(b'c''+ a'c'), -\frac{b'}{a'}(b'c''+ a'c')+\frac{c''}{a'}\right )$

The distance is then equal to
$$\sqrt{\left (-(b'c''+ a'c')-\left (-(bc''+ ac)\right )\right )^2+\left (-\frac{b'}{a'}(b'c''+ a'c')+\frac{c''}{a'}-\left (-\frac{b}{a}(bc''+ ac)+\frac{c''}{a}\right )\right )^2} \\ = \sqrt{\left (-b'c''- a'c'+bc''+ ac\right )^2+\left (-\frac{b'^2c''}{a'}-c' +\frac{c''}{a'}+\frac{b^2c''}{a}+ c-\frac{c''}{a}\right )^2}$$

Is everything correct so far? Is this result we are looking for? (Wondering)
 
Last edited by a moderator:
  • #4
mathmari said:
Hey! :eek:

Let $ax+by+c=0$ and $a'x+b'y+c'=0$ be the equations of two parallel lines $g$ and $g'$ in Hesse normal form. I want to calculate the between the two lines.

We have to pick a point of the line $g'$ and calculate the distance of that point and the line $g$, or not? (Wondering)

How can we use the Hesse normal form of the lines? (Wondering)

Hey mathmari! (Smile)

If $ax+by+c=0$ is in Hesse normal form, then the (signed) distance of the line to the origin is $c$.
That means that the vector perpendicular to the line, from the origin to the line, has length $|c|$.
Since the same is true for $a'x+b'y+c'=0$, its corresponding distance is $|c'|$.
And since those lines are parallel, those two vectors are colinear.

\begin{tikzpicture}[>=stealth]
\fill circle (0.1) node [below] {$O$};
\draw[green!70!black] (0,0) -- node[below right] {$|c'|$} (6,4.5);
\draw[blue] (0,0) -- node[above left] {$|c|$} (4,3);
\draw[->, green!70!black, ultra thick] (0,0) -- node[below right] {$(a',b')$} (4/5,3/5);
\draw[->, blue, ultra thick] (0,0) -- node[above left] {$(a,b)$} (4/5,3/5);
\draw[blue, ultra thick] (1,7) node
{$ax+by+c=0$} -- (7, -1);
\draw[green!70!black, ultra thick] (3,8.5) node
{$a'x+b'y+c'=0$} -- (9, 0.5);
\end{tikzpicture}

In turn that means that the distance between the two parallel lines is either $|c-c'|$ or $|c+c'|$, depending on the orientation of the lines. (Thinking)​
 
  • #5
I like Serena said:
If $ax+by+c=0$ is in Hesse normal form, then the (signed) distance of the line to the origin is $c$.
That means that the vector perpendicular to the line, from the origin to the line, has length $|c|$.
Since the same is true for $a'x+b'y+c'=0$, its corresponding distance is $|c'|$.
And since those lines are parallel, those two vectors are colinear.In turn that means that the distance between the two parallel lines is either $|c-c'|$ or $|c+c'|$, depending on the orientation of the lines. (Thinking)

Ah ok! By signed distance you mean that we take into consideration if the line is above or below the origin, or not? (Wondering)

So, by what I did in post #3 would we get also that result, or can we justify it just in this way? (Wondering)
 
  • #6
mathmari said:
Ah ok! By signed distance you mean that we take into consideration if the line is above or below the origin, or not?

Not exactly. I depends on whether the vector (a, b) point towards the line or away from it.
Note that since both lines are colinear, that means that (a, b) and (a', b') must be colinear as well.
And since they are both of unit length, they must either be identical, or exactly opposite.
If they are identical, the distance is $|c' - c|$, and if they are opposite, then the distance is $|c'+c|$. (Thinking)
mathmari said:
So, by what I did in post #3 would we get also that result, or can we justify it just in this way?

We should be able to yes, and as we can see it becomes quite complicated.

Anyway, it seems as if you're looking at a series of problems that are intended to be solved by understanding and using the Hesse normal form.
Or perhaps I'm already running ahead and is your course material leading up to it. (Wondering)
 
  • #7
I like Serena said:
Not exactly. I depends on whether the vector (a, b) point towards the line or away from it.
Note that since both lines are colinear, that means that (a, b) and (a', b') must be colinear as well.
And since they are both of unit length, they must either be identical, or exactly opposite.
If they are identical, the distance is $|c' - c|$, and if they are opposite, then the distance is $|c'+c|$. (Thinking)

Ah I see!

Does it hold in general that $ax+by+c$ describes the signed distance of $(x,y)$ from the origin? (Wondering)
I like Serena said:
Note that since both lines are colinear, that means that (a, b) and (a', b') must be colinear as well.

Do you mean by "both lines are colinear" that they are parallel? (Wondering)
 
  • #8
mathmari said:
Ah I see!

Does it hold in general that $ax+by+c$ describes the signed distance of $(x,y)$ from the origin? (Wondering)

More precisely, if we have a line given by $ax+by+c = 0$ in the Hesse normal form (that is, $a^2+b^2=1$), then $-c$ is the signed distance of the line to the origin.

For the record, the Hesse normal form is also written as:
$$\mathbf r \cdot \mathbf n - d = 0$$
where $\mathbf r$ is any point on the line, $\mathbf n$ is the normal of unit length, and $d$ is the signed distance of the line to the origin.

We can verify by substituting $\mathbf r = d\mathbf n$... (Thinking)

mathmari said:
Do you mean by "both lines are colinear" that they are parallel? (Wondering)

My mistake, I meant that both lines are parallel.
 
  • #9
I understand! Thank you so much! (Mmm)
 

FAQ: How to Calculate the Distance Between Parallel Lines in Hesse Normal Form?

What is the definition of distance between parallel lines?

The distance between parallel lines is the shortest distance between any point on one line and any point on the other line.

How do you calculate the distance between parallel lines?

To calculate the distance between parallel lines, you can use the formula d = |ax + by + c| / sqrt(a^2 + b^2), where a and b are the coefficients of the x and y terms in the equations of the lines, and c is the constant term.

Can the distance between parallel lines be negative?

No, the distance between parallel lines is always positive. This is because the absolute value of the numerator in the distance formula guarantees a positive value, and the denominator, which is the length of the line segment connecting the two lines, is also always positive.

What does it mean if the distance between parallel lines is zero?

If the distance between parallel lines is zero, it means that the two lines are coincident, meaning they are the same line and have an infinite number of points in common.

Can the distance between parallel lines be greater than the distance between two non-parallel lines?

No, the distance between parallel lines is always less than or equal to the distance between two non-parallel lines. This is because the shortest distance between two lines is always a perpendicular distance, and for parallel lines, this distance is zero.

Back
Top