Difference between revisions of "Equation of a Line"
(Created page with "* [https://www.youtube.com/watch?v=gvwKv6F69F0 Equation of a Line], Khan Academy * [https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:forms-of-linear-equations/x2f8bb...") |
|||
| 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. | ||
| + | |||
| + | ====Slope–intercept form or Gradient-intercept form==== | ||
| + | A non-vertical line can be defined by its slope {{mvar|m}}, and its {{mvar|y}}-intercept {{math|''y''{{sub|0}}}} (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> | ||
| + | |||
| + | If, moreover, the line is not horizontal, it can be defined by its slope and its {{mvar|x}}-intercept {{math|''x''{{sub|0}}}}. In this case, its equation can be written | ||
| + | :<math>y=m(x-x_0),</math> | ||
| + | or, equivalently, | ||
| + | :<math>y=mx-mx_0.</math> | ||
| + | |||
| + | These forms rely on the habit of considering a non vertical line as the [[graph of a function]].<ref>{{harvnb|Larson|Hostetler|2007|loc=p. 25}}</ref> For a line given by an equation | ||
| + | :<math>ax+by+c = 0,</math> | ||
| + | these forms can be easily deduced from the relations | ||
| + | :<math>\begin{align} | ||
| + | m&=-\frac ab,\\ | ||
| + | x_0&=-\frac ca,\\ | ||
| + | y_0&=-\frac cb. | ||
| + | \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 | ||
| + | :<math>y=y_1 + m(x-x_1),</math> | ||
| + | or | ||
| + | :<math>y=mx +y_1-mx_1.</math> | ||
| + | |||
| + | This equation can also be written | ||
| + | :<math>y-y_1=m(x-x_1)</math> | ||
| + | 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 {{math|''x''{{sub|0}}}} and {{math|''y''{{sub|0}}}} of these two points are nonzero, and an equation of the line is<ref name=WilsonTracey>{{harvnb|Wilson|Tracey|1925|loc=pp. 52-53}}</ref> | ||
| + | :<math>\frac{x}{x_0} + \frac{y}{y_0} = 1.</math> | ||
| + | (It is easy to verify that the line defined by this equation has {{math|''x''{{sub|0}}}} and {{math|''y''{{sub|0}}}} as intercept values). | ||
| + | |||
| + | ====Two-point form==== | ||
| + | Given two different points {{math|(''x''{{sub|1}}, ''y''{{sub|1}})}} and {{math|(''x''{{sub|2}}, ''y''{{sub|2}})}}, there is exactly one line that passes through them. There are several ways to write a linear equation of this line. | ||
| + | |||
| + | If {{math|''x''{{sub|1}} ≠ ''x''{{sub|2}}}}, the slope of the line is <math>\frac{y_2 - y_1}{x_2 - x_1}.</math> Thus, a point-slope form is<ref name=WilsonTracey /> | ||
| + | :<math>y - y_1 = \frac{y_2 - y_1}{x_2 - x_1} (x - x_1).</math> | ||
| + | |||
| + | By [[clearing denominators]], one gets the equation | ||
| + | :<math> (x_2 - x_1)(y - y_1) - (y_2 - y_1)(x - x_1)=0,</math> | ||
| + | which is valid also when {{math|1=''x''{{sub|1}} = ''x''{{sub|2}}}} (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: | ||
| + | :<math>(y_1-y_2)x + (x_2-x_1)y + (x_1y_2 - x_2y_1) =0</math> | ||
| + | (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 <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 | ||
| + | :<math>\begin{vmatrix}x-x_1&y-y_1\\x_2-x_1&y_2-y_1\end{vmatrix}=0.</math> | ||
| + | |||
| + | The equation <math> (y_1-y_2)x + (x_2-x_1)y + (x_1y_2 - x_2y_1)=0</math> can be obtained be expanding with respect to its first row the determinant in the equation | ||
| + | :<math>\begin{vmatrix} | ||
| + | x&y&1\\ | ||
| + | x_1&y_1&1\\ | ||
| + | x_2&y_2&1 | ||
| + | \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 [[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 == | ||
| + | Content obtained and/or adapted from: | ||
| + | * [https://en.wikipedia.org/wiki/Linear_equation Linear equation, Wikipedia] under a CC BY-SA license | ||
| + | |||
| + | == Resources == | ||
* [https://www.youtube.com/watch?v=gvwKv6F69F0 Equation of a Line], Khan Academy | * [https://www.youtube.com/watch?v=gvwKv6F69F0 Equation of a Line], Khan Academy | ||
* [https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:forms-of-linear-equations/x2f8bb11595b61c86:writing-slope-intercept-equations/v/equation-of-a-line-1 Slope-intercept equation from slope & point], Khan Academy | * [https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:forms-of-linear-equations/x2f8bb11595b61c86:writing-slope-intercept-equations/v/equation-of-a-line-1 Slope-intercept equation from slope & point], Khan Academy | ||
Revision as of 15:04, 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 yTemplate:Sub (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 xTemplate:Sub. In this case, its equation can be written
or, equivalently,
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y=mx-mx_0.}
These forms rely on the habit of considering a non vertical line as the graph of a function.[1] For a line given by an equation
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle ax+by+c = 0,}
these forms can be easily deduced from the relations
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} m&=-\frac ab,\\ x_0&=-\frac ca,\\ y_0&=-\frac cb. \end{align}}
Point–slope form or Point-gradient form
A non-vertical line can be defined by its slope m, and the coordinates Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x_1, y_1} of any point of the line. In this case, a linear equation of the line is
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y=y_1 + m(x-x_1),}
or
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y=mx +y_1-mx_1.}
This equation can also be written
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y-y_1=m(x-x_1)}
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 xTemplate:Sub and yTemplate:Sub of these two points are nonzero, and an equation of the line is[2]
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{x}{x_0} + \frac{y}{y_0} = 1.}
(It is easy to verify that the line defined by this equation has xTemplate:Sub and yTemplate:Sub as intercept values).
Two-point form
Given two different points (xTemplate:Sub, yTemplate:Sub) and (xTemplate:Sub, yTemplate:Sub), there is exactly one line that passes through them. There are several ways to write a linear equation of this line.
If xTemplate:Sub ≠ xTemplate:Sub, the slope of the line is Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{y_2 - y_1}{x_2 - x_1}.} Thus, a point-slope form is[2]
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y - y_1 = \frac{y_2 - y_1}{x_2 - x_1} (x - x_1).}
By clearing denominators, one gets the equation
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (x_2 - x_1)(y - y_1) - (y_2 - y_1)(x - x_1)=0,}
which is valid also when xTemplate:Sub = xTemplate: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:
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (y_1-y_2)x + (x_2-x_1)y + (x_1y_2 - x_2y_1) =0}
(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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (x_2 - x_1)(y - y_1) - (y_2 - y_1)(x - x_1)=0} is the result of expanding the determinant in the equation
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{vmatrix}x-x_1&y-y_1\\x_2-x_1&y_2-y_1\end{vmatrix}=0.}
The equation Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (y_1-y_2)x + (x_2-x_1)y + (x_1y_2 - x_2y_1)=0} can be obtained be expanding with respect to its first row the determinant in the equation
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{vmatrix} x&y&1\\ x_1&y_1&1\\ x_2&y_2&1 \end{vmatrix}=0.}
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