Select your language

Suggested languages for you:
Log In Start studying!
StudySmarter - The all-in-one study app.
4.8 • +11k Ratings
More than 3 Million Downloads
Free
|
|

All-in-one learning app

  • Flashcards
  • NotesNotes
  • ExplanationsExplanations
  • Study Planner
  • Textbook solutions
Start studying

Distance from a Point to a Line

Distance from a Point to a Line

Suppose there is a line and a point in a Cartesian plane. What can one do to relate the line and the point and define a characteristic that would co-relate them?

One such fundamental way of relating them is the distance between them, and that’s what we shall attempt to find out in this article: the distance from a point to a line.

Distance from a point to a line definition

Let us analyze this problem using the diagram below.

Distance from a point to a line, a line and a point A with some distances on it, StudySmarter

A line l and a point A with some of the possible distances between them, StudySmarter Originals

If one was asked to find the distance between the point A and line l then it would be really ambiguous since there are several, in fact, infinite ways we can connect the point and the line.

Hence, one has to be specific about which distance is asked about. Some of the distances are shown by the green segments in the above diagram.

But the only specific distance that can be named and one can quantify is the shortest distance between the point and the line.

The shortest distance between the line and the point is shown by the pink line segment in the above diagram.

The distance between a point and a line is given by the shortest distance between them.

The shortest line segment is perpendicular to the line itself. Because any other line segment will make an acute or obtuse angle with the line, the shortest distance will only be possible when it will be perpendicular to the line.

This distance can alternatively be seen as the shortest way by which point A can be brought to line l.

But how can one determine the distance between a point and a line using the equation of a line and the coordinates of the point? Let us explore how we can come up with such a formula.

Distance from a point to a line formula

Let D be a straight line whose equation is given by where are not simultaneously 0, and a point A outside the line, that is not belonging to the line.

The goal is to find the shortest distance between the line D and point P. Let the point where the shortest line segment intersects the line be Q whose coordinates are .

The distance between the point and the line D is the same as the length of the line segment formed by points A and Q or the distance between them. We can use the distance formula to do so but we need to know the coordinates of Q in terms of for that purpose.

Distance from a point to a line, The distance between a point and a line, StudySmarterThe distance between a point and a line, StudySmarter Originals

Recall that the gradient of a line with equation is given by . Now the line segment AQ is perpendicular to the line so its slope will be . The reason being that the product of slopes of two perpendicular lines is always -1 that is.

We now have the slope of the line joining AQ and the coordinates of a point A on it. Using this information, we can now form the equation of line AQ,

Since Q lies on this line, we can substitute for to find the unknowns .

But Q also lies on the line , so it will satisfy the equation of line D, hence we have

The above two lines intersect at Q and hence can be solved simultaneously in order to determine the unknowns , writing the first equation in terms of ,

Substituting the expression of in , we get

Solving for we get,

Expanding the brackets and rearranging the terms, we get

Multiplying both sides by , we get

Now we shall divide by , to get

Substituting this back into to determine , we get

Reducing to a common denominator, we get

Upon simplification, we have

Upon further simplification by eliminating the like terms, we get

Now we have obtained the coordinates of point Q in terms of the constants we know,

Now we can calculate the distance between A and Q using the distance, which is nothing but the distance from the point to the line as we discussed earlier. Let us denote it by d and apply the distance formula,

Substituting for we get

Upon further simplification, we get

Taking the square root on both sides, we get,

Since d is distance, it cannot be negative so we reject the negative root, giving us,

But there is still a possibility when the numerator is negative. To avoid it being negative, its modulus has to be taken,

We don’t run into that problem since the denominator is a sum of squares of non-zero numbers, so it will always be positive.

To write the same expression in a more convenient (and easy to remember) form, let us define the equation of the line as to get , leaving us with,

Now let us apply this formula through a couple of examples.

Calculating the distance from a point to a line

Calculating the distance from a line to a point is a relatively straightforward process. The equation of a line shall be given and the point to which the distance should be calculated.

Find the distance between the line and the point .

Solution

Comparing the given equation to the general form, we get a=4, b=3 and c=-2, and x0=2, y0=4.

Recalling the distance formula and substituting all the corresponding values we get,

Thus, the distance between the line and is units.

Find the distance between the line and the point .

Solution

Comparing the given equation to the general form, we get a=5, b=-2 and c=0, and .

Recalling the distance formula and substituting all the corresponding values we get,

Thus, the distance between the line and (3,0) is units.

Distance from a point to a line example

Find the distance between the two lines whose equations are given by and .

Solution

Notice that the two lines have the same slope, 2, which implies that they are parallel.

To find the distance between the two lines, we can take a point on one of those lines and use the ‘distance from a point to a line’ formula to get the distance.

Let us find the point on the first line by substituting x=0 (as it is easy to calculate, any other value of x would have been equally valid),

Thus one point on the line is (0,-5). Now we can use the formula we derived earlier to find the distance between this point and the line .

But first, we rewrite y=2x+3 in the general form to get, -2x+y-3=0, and hence we have a=-2, b=1 and c=-3, which we substitute in the above equation to get d:

Therefore, the distance between the point (0,-5) and the line is units.

But remember that this point lies on the line and these lines are parallel, so the distance between the two lines is also as described earlier.

Distance from a Point to a Line - Key takeaways

    • The distance between a point and a line can be measured in many distinct ways but the shortest distance between them is the one that counts.
    • The distance between a point and a line is measured by the shortest distance between them, it is also the same as the perpendicular distance between them.
    • Let a line be given by , then the distance between this line and the point is given by the formula .

Frequently Asked Questions about Distance from a Point to a Line

The closest distance between a line given by f(x,y)=ax+by+c=0 and a point (x1,y1) is given by d=|f(x1,y1)|/(a2+b2)1/2

The shortest distance between a point and a line is the same as the perpendicular distance between them.

The distance from a point to a line is the measure of the shortest path between them. 

The distance from any point from to the origin is the root of the sum of squares of its coordinates: d2=(-3)2+42

which gives us d=5. Hence the distance of that point is 5 units from the origin. 

The distance from any point from to the origin is the root of the sum of squares of its co-ordinates: d2=(-6)2+82

which gives us d=10. Hence the distance of that point is 10 units from the origin. 

Final Distance from a Point to a Line Quiz

Question

What do we need to know about the distance formula? 


Show answer

Answer

The coordinates of the two points we want to find the distance between.

Show question

Question

How many ways are there to connect a point  and a line?

Show answer

Answer

Infinite

Show question

Question

What would one have to be specific about if one was asked to find the distance between the point and line? 

Show answer

Answer

One has to be specific about the shortest distance only.

Show question

Question

What is the only specific distance that can be named and one can quantify?

Show answer

Answer

The shortest distance between a point and a line is the only one that can be named and quantified. The infinite others cannot be named or quantified similarly. 

Show question

Question

The shortest line segment is perpendicular to what?

Show answer

Answer

The line itself.

Show question

Question

Which line segment will make a right angle with the given line?

Show answer

Answer

The line segment formed by the shortest line segment will be the only one that will form a right angle with the line.

Show question

Question

What is a fundamental way of relating a line and a point in a Cartesian plane?

Show answer

Answer

The distance between them.

Show question

Question

The shortest distance between a line and a point is also known as ________.(fill in the blank).

Show answer

Answer

Perpendicular distance between a point and a line.

Show question

Question

Give a formula that relates the slope of a line to the slope of its perpendicular?

Show answer

Answer

Let m1 be the slope of the line and m2 be the slope of its perpendicular line, then their product is always -1: 

m1m= -1



Show question

Question

How can we find the distance between two parallel lines?

Show answer

Answer

The distance between two parallel lines can be calculated by taking a point on one line and finding its distance from the other line. 

In this way, the problem of calculating the distance between two parallel lines is reduced to a problem of finding the distance from a point to a line. 

Show question

Question

What will be the locus of all the points formed by the intersection of a line and its perpendicular measured from a fixed point?

Show answer

Answer

Circle

Show question

More about Distance from a Point to a Line
60%

of the users don't pass the Distance from a Point to a Line quiz! Will you pass the quiz?

Start Quiz

Discover the right content for your subjects

No need to cheat if you have everything you need to succeed! Packed into one app!

Study Plan

Be perfectly prepared on time with an individual plan.

Quizzes

Test your knowledge with gamified quizzes.

Flashcards

Create and find flashcards in record time.

Notes

Create beautiful notes faster than ever before.

Study Sets

Have all your study materials in one place.

Documents

Upload unlimited documents and save them online.

Study Analytics

Identify your study strength and weaknesses.

Weekly Goals

Set individual study goals and earn points reaching them.

Smart Reminders

Stop procrastinating with our study reminders.

Rewards

Earn points, unlock badges and level up while studying.

Magic Marker

Create flashcards in notes completely automatically.

Smart Formatting

Create the most beautiful study materials using our templates.

Sign up to highlight and take notes. It’s 100% free.