Difference between revisions of "Equation of a Line"
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | == Equation of a line == | |
There are various ways of defining a line. In the following subsections, a linear equation of the line is given in each case. | There are various ways of defining a line. In the following subsections, a linear equation of the line is given in each case. | ||
− | + | ===Slope–intercept form or Gradient-intercept form=== | |
− | A non-vertical line can be defined by its slope {{mvar|m}}, and its {{mvar|y}}-intercept | + | A non-vertical line can be defined by its slope {{mvar|m}}, and its {{mvar|y}}-intercept ''y''<sub>0</sub> (the {{mvar|y}} coordinate of its intersection with the {{mvar|y}}-axis). In this case its ''linear equation'' can be written |
:<math>y=mx+y_0.</math> | :<math>y=mx+y_0.</math> | ||
− | If, moreover, the line is not horizontal, it can be defined by its slope and its {{mvar|x}}-intercept | + | If, moreover, the line is not horizontal, it can be defined by its slope and its {{mvar|x}}-intercept ''x''<sub>0</sub>. In this case, its equation can be written |
:<math>y=m(x-x_0),</math> | :<math>y=m(x-x_0),</math> | ||
or, equivalently, | or, equivalently, | ||
:<math>y=mx-mx_0.</math> | :<math>y=mx-mx_0.</math> | ||
− | These forms rely on the habit of considering a non vertical line as the | + | These forms rely on the habit of considering a non vertical line as the graph of a function. For a line given by an equation |
:<math>ax+by+c = 0,</math> | :<math>ax+by+c = 0,</math> | ||
these forms can be easily deduced from the relations | these forms can be easily deduced from the relations | ||
Line 20: | Line 20: | ||
\end{align}</math> | \end{align}</math> | ||
− | + | ===Point–slope form or Point-gradient form=== | |
A non-vertical line can be defined by its slope {{mvar|m}}, and the coordinates <math>x_1, y_1</math> of any point of the line. In this case, a linear equation of the line is | A non-vertical line can be defined by its slope {{mvar|m}}, and the coordinates <math>x_1, y_1</math> of any point of the line. In this case, a linear equation of the line is | ||
Line 31: | Line 31: | ||
for emphasizing that the slope of a line can be computed from the coordinates of any two points. | for emphasizing that the slope of a line can be computed from the coordinates of any two points. | ||
− | + | ===Intercept form=== | |
− | A line that is not parallel to an axis and does not pass through the origin cuts the axes in two different points. The intercept values | + | A line that is not parallel to an axis and does not pass through the origin cuts the axes in two different points. The intercept values ''x''<sub>0</sub> and ''y''<sub>0</sub> of these two points are nonzero, and an equation of the line is |
:<math>\frac{x}{x_0} + \frac{y}{y_0} = 1.</math> | :<math>\frac{x}{x_0} + \frac{y}{y_0} = 1.</math> | ||
− | (It is easy to verify that the line defined by this equation has | + | (It is easy to verify that the line defined by this equation has ''x''<sub>0</sub> and ''y''<sub>0</sub> as intercept values). |
− | + | ===Two-point form=== | |
− | Given two different points | + | Given two different points (''x''<sub>1</sub>, ''y''<sub>1</sub>) and (''x''<sub>2</sub>, ''y''<sub>2</sub>), there is exactly one line that passes through them. There are several ways to write a linear equation of this line. |
− | If | + | If ''x''<sub>1</sub> ≠ ''x''<sub>2</sub>, the slope of the line is <math>\frac{y_2 - y_1}{x_2 - x_1}.</math> Thus, a point-slope form is |
:<math>y - y_1 = \frac{y_2 - y_1}{x_2 - x_1} (x - x_1).</math> | :<math>y - y_1 = \frac{y_2 - y_1}{x_2 - x_1} (x - x_1).</math> | ||
− | By | + | By clearing denominators, one gets the equation |
:<math> (x_2 - x_1)(y - y_1) - (y_2 - y_1)(x - x_1)=0,</math> | :<math> (x_2 - x_1)(y - y_1) - (y_2 - y_1)(x - x_1)=0,</math> | ||
− | which is valid also when | + | which is valid also when ''x''<sub>1</sub> = ''x''<sub>2</sub> (for verifying this, it suffices to verify that the two given points satisfy the equation). |
This form is not symmetric in the two given points, but a symmetric form can be obtained by regrouping the constant terms: | This form is not symmetric in the two given points, but a symmetric form can be obtained by regrouping the constant terms: | ||
Line 50: | Line 50: | ||
(exchanging the two points changes the sign of the left-hand side of the equation). | (exchanging the two points changes the sign of the left-hand side of the equation). | ||
− | + | ===Determinant form=== | |
− | The two-point form of the equation of a line can be expressed simply in terms of a | + | The two-point form of the equation of a line can be expressed simply in terms of a determinant. There are two common ways for that. |
The equation <math> (x_2 - x_1)(y - y_1) - (y_2 - y_1)(x - x_1)=0</math> is the result of expanding the determinant in the equation | The equation <math> (x_2 - x_1)(y - y_1) - (y_2 - y_1)(x - x_1)=0</math> is the result of expanding the determinant in the equation | ||
Line 63: | Line 63: | ||
\end{vmatrix}=0.</math> | \end{vmatrix}=0.</math> | ||
− | Beside being very simple and mnemonic, this form has the advantage of being a special case of the more general equation of a | + | Beside being very simple and mnemonic, this form has the advantage of being a special case of the more general equation of a hyperplane passing through {{mvar|n}} points in a space of dimension {{math|''n'' – 1}}. These equations rely on the condition of linear dependence of points in a projective space. |
== Licensing == | == Licensing == |
Latest revision as of 15:27, 11 January 2022
Contents
Equation of a line
There are various ways of defining a line. In the following subsections, a linear equation of the line is given in each case.
Slope–intercept form or Gradient-intercept form
A non-vertical line can be defined by its slope m, and its y-intercept y0 (the y coordinate of its intersection with the y-axis). In this case its linear equation can be written
If, moreover, the line is not horizontal, it can be defined by its slope and its x-intercept x0. In this case, its equation can be written
or, equivalently,
These forms rely on the habit of considering a non vertical line as the graph of a function. For a line given by an equation
these forms can be easily deduced from the relations
Point–slope form or Point-gradient form
A non-vertical line can be defined by its slope m, and the coordinates of any point of the line. In this case, a linear equation of the line is
or
This equation can also be written
for emphasizing that the slope of a line can be computed from the coordinates of any two points.
Intercept form
A line that is not parallel to an axis and does not pass through the origin cuts the axes in two different points. The intercept values x0 and y0 of these two points are nonzero, and an equation of the line is
(It is easy to verify that the line defined by this equation has x0 and y0 as intercept values).
Two-point form
Given two different points (x1, y1) and (x2, y2), there is exactly one line that passes through them. There are several ways to write a linear equation of this line.
If x1 ≠ x2, the slope of the line is Thus, a point-slope form is
By clearing denominators, one gets the equation
which is valid also when x1 = x2 (for verifying this, it suffices to verify that the two given points satisfy the equation).
This form is not symmetric in the two given points, but a symmetric form can be obtained by regrouping the constant terms:
(exchanging the two points changes the sign of the left-hand side of the equation).
Determinant form
The two-point form of the equation of a line can be expressed simply in terms of a determinant. There are two common ways for that.
The equation is the result of expanding the determinant in the equation
The equation can be obtained be expanding with respect to its first row the determinant in the equation
Beside being very simple and mnemonic, this form has the advantage of being a special case of the more general equation of a hyperplane passing through n points in a space of dimension n – 1. These equations rely on the condition of linear dependence of points in a projective space.
Licensing
Content obtained and/or adapted from:
- Linear equation, Wikipedia under a CC BY-SA license
Resources
- Equation of a Line, Khan Academy
- Slope-intercept equation from slope & point, Khan Academy