# Shortest distance between a point and a line

- Distance between point & line
- Distance from a point to a line
- Perpendicular Distance from a Point to a Line

## Distance between point & line

The distance (or perpendicular distance) from a point to a line is the shortest distance from a fixed point to any point on a fixed infinite line in Euclidean geometry.

andIf you're seeing this message, it means we're having trouble loading external resources on our website. To log in and use all the features of Khan Academy, please enable JavaScript in your browser. Math Geometry all content Analytic geometry Challenge: Distance between a point and a line. Current timeTotal duration Video transcript Find the distance between the point negative 2, negative 4. This point right here. That's this line right over here.

By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up. Okay, I know what you're thinking : this question has been asked a billion times before. But I have done my research, and sadly, the only answers I have found were presented in computer code, which I never learned, or involve too many vectors and constants that might seem a bit redundant I'm sorry if I'm offending anybody.

By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. Setup a private space for you and your coworkers to ask questions and share information. I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want; I can translate it into what I'm using Javascript. EDIT: My line segment is defined by two endpoints.

How can you find the distance between two objects say two street lights? By measuring the length between them. By the length between the two street lights, we can find the distance. We have to measure the length between the two. Similarly, for finding the distance between two points, we measure the length between them. Here, we will study how to find the distance of point from a line. We are familiar with the representation of points on a graph sheet.

The equation of a line in slope-intercept form is given by. Now consider the distance from a point to the line. Points on the line have the vector coordinates. Now, a vector from the point to the line is given by. Projecting onto ,. If the line is specified by two points and , then a vector perpendicular to the line is given by.

The distance or perpendicular distance from a point to a line is the shortest distance from a fixed point to any point on a fixed infinite line in Euclidean geometry. It is the length of the line segment which joins the point to the line and is perpendicular to the line. The formula for calculating it can be derived and expressed in several ways. Knowing the shortest distance from a point to a line can be useful in various situations—for example, finding the shortest distance to reach a road, quantifying the scatter on a graph, etc. In Deming regression , a type of linear curve fitting, if the dependent and independent variables have equal variance this results in orthogonal regression in which the degree of imperfection of the fit is measured for each data point as the perpendicular distance of the point from the regression line.

## Distance from a point to a line

## Perpendicular Distance from a Point to a Line

By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up. After that you have several cases to study, but nothing too complex. If you have troubles here, ask in comments. After loking carefully at the picture, you can get the following result. Sign up to join this community.

Easy to understand math lessons on DVD. Try before you commit. BTW - we don't really need to say 'perpendicular' because the distance from a point to a line always means the shortest distance. We have a point P with coordinates m , n. Perpendicular to straight line. We now do a trick to make things easier for ourselves the algebra is really horrible otherwise.

.

Distance between point & line (video) | Khan Academy