First, let's see it in action. Here are two points (you can drag them) and the equation of the line through them. Explanations follow. Show
../geometry/images/geom-line-equn.js The PointsWe use Cartesian Coordinates to mark a point on a graph by how far along and how far up it is:
StepsThere are 3 steps to find the Equation of the Straight Line :
Step 1: Find the Slope (or Gradient) from 2 PointsWhat is the slope (or gradient) of this line? We know two points:
The slope is the change in height divided by the change in horizontal distance. Looking at this diagram ... Slope m = change in ychange in x = yA − yBxA − xB In other words, we:
Like this: m = change in y change in x = 4−3 6−2 = 1 4 = 0.25 It doesn't matter which point comes first, it still works out the same. Try swapping the points: m = change in y change in x = 3−4 2−6 = −1 −4 = 0.25 Same answer. Step 2: The "Point-Slope Formula"Now put that slope and one point into the "Point-Slope Formula" Start with the "point-slope" formula (x1 and y1 are the coordinates of a point on the line): y − y1 = m(x − x1) We can choose any point on the line for x1 and y1, so let's just use point (2,3): y − 3 = m(x − 2) We already calculated the slope "m": m = change in ychange in x = 4−36−2 = 14 And we have: y − 3 = 14(x − 2) That is an answer, but we can simplify it further. Step 3: SimplifyStart with:y − 3 = 14(x − 2) Multiply 14 by (x−2):y − 3 = x4 − 24 Add 3 to both sides:y = x4 − 24 + 3 Simplify:y = x4 + 52 And we get: y = x4 + 52 Which is now in the Slope-Intercept (y = mx + b) form.
Check It!Let us confirm by testing with the second point (6,4): y = x/4 + 5/2 = 6/4 + 2.5 = 1.5 + 2.5 = 4 Yes, when x=6 then y=4, so it works! Another ExampleExample: What is the equation of this line?Start with the "point-slope" formula: y − y1 = m(x − x1) Put in these values:
And we get: y − 6 = −2(x − 1) Simplify to Slope-Intercept (y = mx + b) form: y − 6 = −2x + 2 y = −2x + 8 DONE! The Big ExceptionThe previous method works nicely except for one particular case: a vertical line: A vertical line's gradient is undefined (because we cannot divide by 0): m = yA − yBxA − xB = 4 − 12 − 2 = 30 = undefined But there is still a way of writing the equation: use x= instead of y=, like this: x = 2
7270, 525, 526, 1165, 1166, 7291, 7292, 7300, 7301, 7302 Equation of a Straight Line Straight Line Graph Calculator Algebra Index To find the solution, we can use the slope-intercept formula which is y=mx + b. Here, m is the slope which has formula m=(y2-y1)/(x2-x1) and b is the y-intercept.
Let us find the slope first. Using our two points we get m=(y2-y1)/(x2-x1) = (4--2)/(-3-5) = 6/-8 which reduces to -3/4. Yes1 Yes2 Yes3 Yes4 Yes3 Yes6 Yes3 Yes8 Yes3 /* C++ program to find if line passing through 0
Yes3 /* C++ program to find if line passing through 8
Java
Yes2 Yes3 Yes4 Yes3 Yes6
Yes3 Yes8 Yes3 /* C++ program to find if line passing through 0
Yes00 7Yes02
Yes00 two coordinates also passes through origin 3Yes02
Yes12 Python3Yes13 Yes14 Yes15
Yes16 Yes17
Yes20 Yes21 Yes22 Yes23 Yes24 Yes25 Yes25 Yes27 Yes21 Yes29 Yes23 Yes31
Yes33
Yes25 Yes25 Yes46 Yes47
Yes49 Yes50 7 4
Yes54
Yes49 Yes50 two coordinates also passes through origin 3 4
Yes61 Yes62 C#Yes63
Yes67
Yes1 Yes2 Yes3 Yes4 Yes3 Yes6 Yes78 Yes3 Yes8 Yes3 /* C++ program to find if line passing through 0
Yes96
Yes02
Yes02
PHP
Yes2 /* C++ program to find if line passing through 26namespace 0/* C++ program to find if line passing through 28namespace 0
Yes50 /* C++ program to find if line passing through 26 /* C++ program to find if line passing through 40/* C++ program to find if line passing through 33 Yes23 /* C++ program to find if line passing through 28namespace 6
Yes23 /* C++ program to find if line passing through 26/* C++ program to find if line passing through 51
Yes50 7Yes02
Yes50 two coordinates also passes through origin 3Yes02
Yes12
Javascript
Yes02
Yes02
Output: Yes
Time Complexity: O(1) This article is contributed by Aarti_Rathi. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above What is the equation of the vertical line through − 5 − 2 − 5 − 2?Hence, the required equation of the vertical line passing through (-5,-2) is x = -5.
What is the equation of the line that passes through 5 2 and (1 Expert Answer
m=(y2-y1)/(x2-x1) and b is the y-intercept. Let us find the slope first. Using our two points we get m=(y2-y1)/(x2-x1) = (4--2)/(-3-5) = 6/-8 which reduces to -3/4.
What is the equation of the line through 5 2?2 Answers By Expert Tutors
The vertical line that goes through the point (5,2) has equation x = 5.
Which equation of the line has a slope of 5 and passes through point (y = 5 x + 9 this is the slope intercept form equation that represents the line through (-2,-1) with the slope of 5.
|