From an Equation to a Set of Points
A linear equation in two variables imposes one condition on a point in the plane. For example, the equation \(2x+3y=6\) is satisfied by \((3,0)\), by \((0,2)\), and by many other ordered pairs. Graphing the equation means locating all points that satisfy it, not just a few examples. For a nontrivial linear equation, that full set is a line.
Throughout, the variables \(x\) and \(y\) are real, and their order is fixed: a point with coordinates \((x,y)\) is represented by the column vector \(\mathbf{x}=\begin{bmatrix}x\\y\end{bmatrix}\in\mathbb{R}^2\). In this setting, a linear equation has the form \(ax+by=c\), where \(a,b,c\in\mathbb{R}\). Its solution set is the set of all ordered pairs \((x,y)\) for which substitution makes the equation true.
Why Every Solution Set Is a Line
The key is to find one solution \(\mathbf{p}\) and a nonzero direction vector \(\mathbf{d}\) that preserves the equation. If moving from \(\mathbf{p}\) in the direction \(\mathbf{d}\) does not change \(ax+by\), then every point \(\mathbf{p}+t\mathbf{d}\) remains a solution. In fact, for any nonzero pair \((a,b)\), the vector \(\begin{bmatrix}-b\\a\end{bmatrix}\) has exactly this property.
Proof. First find a solution \(\mathbf{p}\). If \(a\ne0\), take \(\mathbf{p}=\begin{bmatrix}c/a\\0\end{bmatrix}\). If \(a=0\), then \(b\ne0\), and we can take \(\mathbf{p}=\begin{bmatrix}0\\c/b\end{bmatrix}\). In either case, \(\mathbf{p}\) satisfies \(ax+by=c\). The direction vector \(\mathbf{d}=\begin{bmatrix}-b\\a\end{bmatrix}\) is nonzero because \(a,b\) are not both zero. For every \(t\in\mathbb{R}\), the point \(\mathbf{p}+t\mathbf{d}\) gives the left side \(a(p_1-tb)+b(p_2+ta)=ap_1+bp_2+t(-ab+ba)=c\), so every point in the displayed set is a solution. Conversely, let \(\mathbf{q}=\begin{bmatrix}q_1\\q_2\end{bmatrix}\) be any solution and write \(\mathbf{q}-\mathbf{p}=\begin{bmatrix}r_1\\r_2\end{bmatrix}\). Subtracting the equations for \(\mathbf{q}\) and \(\mathbf{p}\) gives \(ar_1+br_2=0\). If \(a\ne0\), then \(r_1=-br_2/a\), so \(\mathbf{q}-\mathbf{p}=(r_2/a)\begin{bmatrix}-b\\a\end{bmatrix}\). If \(a=0\), then \(b\ne0\) and \(r_2=0\), so \(\mathbf{q}-\mathbf{p}=(-r_1/b)\begin{bmatrix}-b\\0\end{bmatrix}\). Thus every solution has the stated form, proving equality of the two sets. \(\square\)
The condition that the equation be nontrivial matters. If \(a=b=0\), the equation is \(0=c\): when \(c=0\), every point of \(\mathbb{R}^2\) is a solution, and when \(c\ne0\), there are no solutions. Neither solution set is a line. This special case is why the theorem requires at least one nonzero coefficient.
Graphing with Intercepts
An x-intercept is a point on the graph whose \(y\)-coordinate is zero; to find one, set \(y=0\) in the equation. A y-intercept has \(x=0\); set \(x=0\) to find it. When \(a\ne0\), the x-intercept is \((c/a,0)\), and when \(b\ne0\), the y-intercept is \((0,c/b)\). Once two distinct points on the line are known, plot them and draw the straight line through them.
There are two important qualifications. If \(c=0\) and both coefficients are nonzero, the two intercepts are both the origin, so they do not give two distinct points. Use the direction vector from the theorem to find another point. If one coefficient is zero, the equation is vertical or horizontal, and one of the usual intercept formulas does not apply.
Worked Example: A Line with Two Distinct Intercepts
Graph \(2x+3y=6\) using intercepts, and check points on the graph.
To find the x-intercept, set \(y=0\). Then \(2x+3(0)=6\), so \(2x=6\), and \(x=3\). The x-intercept is \((3,0)\). To find the y-intercept, set \(x=0\). Then \(2(0)+3y=6\), so \(3y=6\), and \(y=2\). The y-intercept is \((0,2)\). Plot these two points and draw the line through them.
For another check, substitute \((3,0)\) into the equation: \(2(3)+3(0)=6+0=6\). Substitute \((0,2)\): \(2(0)+3(2)=0+6=6\). Both points lie on the graph. The direction vector \(\begin{bmatrix}-3\\2\end{bmatrix}\) gives the same line: starting at \(\begin{bmatrix}3\\0\end{bmatrix}\), setting \(t=-1\) gives \(\begin{bmatrix}3\\0\end{bmatrix}-\begin{bmatrix}-3\\2\end{bmatrix}=\begin{bmatrix}6\\-2\end{bmatrix}\). Checking that point gives \(2(6)+3(-2)=12-6=6\).
Slope, Horizontal Lines, and Vertical Lines
When \(b\ne0\), rearranging the equation gives \(y=-(a/b)x+c/b\). This is the form \(y=mx+k\), where the slope \(m\) is the change in \(y\) for a unit change in \(x\), and \(k\) is the y-intercept. In this case, the slope is \(-a/b\). If \(b=0\), division by \(b\) is not possible; the original equation instead fixes \(x\), producing a vertical line. If \(a=0\) and \(b\ne0\), the equation fixes \(y\), producing a horizontal line.
Proof. If \(b\ne0\), subtract \(ax\) from both sides of \(ax+by=c\) and divide by \(b\); this gives \(y=-(a/b)x+c/b\), with no change in the solution set because these operations are reversible. If \(b=0\), the nontriviality condition forces \(a\ne0\), so \(ax=c\) is equivalent to \(x=c/a\), with no restriction on \(y\). This is the set of points on a vertical line. If \(a=0\), then \(b\ne0\), and \(by=c\) is equivalent to \(y=c/b\), with no restriction on \(x\). This is a horizontal line. \(\square\)
Worked Example: A Vertical Line
Graph \(x=-2\) and decide whether \((-2,3)\) and \((0,-2)\) lie on it.
Write the equation as \(1x+0y=-2\). Since the coefficient of \(y\) is zero, every solution has \(x=-2\), while \(y\) can be any real number. Plot two points with \(x=-2\), such as \((-2,0)\) and \((-2,2)\), and draw the vertical line through them.
Check \((-2,3)\): its first coordinate is \(-2\), so it satisfies the equation; direct substitution gives \(-2=-2\). Check \((0,-2)\): its first coordinate is \(0\), so it does not satisfy the equation; direct substitution gives \(0=-2\), which is false. The second coordinate alone does not determine whether a point lies on this vertical line.
Worked Example: A Line Through the Origin
Graph \(3x-2y=0\) and find a second point besides the origin.
Setting \(y=0\) gives \(3x=0\), so \(x=0\). Setting \(x=0\) gives \(-2y=0\), so \(y=0\). Both intercepts coincide at \((0,0)\), so they do not by themselves give two distinct points. Here \(a=3\) and \(b=-2\), so the direction vector from the theorem is \(\begin{bmatrix}2\\3\end{bmatrix}\). Starting at the origin and choosing \(t=1\) gives the point \((2,3)\). Plot \((0,0)\) and \((2,3)\), then draw the line through them.
Check the second point by substitution: \(3(2)-2(3)=6-6=0\). More generally, points on the line have the form \(\begin{bmatrix}0\\0\end{bmatrix}+t\begin{bmatrix}2\\3\end{bmatrix}=\begin{bmatrix}2t\\3t\end{bmatrix}\). Substitution verifies every such point: \(3(2t)-2(3t)=6t-6t=0\).
Common Pitfall: Set the Correct Coordinate to Zero
When finding an x-intercept, set \(y=0\), not \(x=0\). When finding a y-intercept, set \(x=0\). For \(2x+3y=6\), a mistaken calculation might set \(x=0\) and call the resulting point an x-intercept: this gives \(3y=6\), \(y=2\), or \((0,2)\). But \((0,2)\) has x-coordinate zero, so it is the y-intercept. The correction is to set \(y=0\) for the x-intercept, which gives \(2x=6\), \(x=3\), and \((3,0)\). Substitution checks that both points lie on the line, but their zero coordinates determine which intercept each one is.
A second error is to divide by a coefficient that is zero. For example, rewriting \(x=-2\) as a formula for \(y\) would require dividing by the coefficient \(0\) of \(y\), which is invalid. Keep the equation in the form \(x=-2\): it already describes a vertical line. In contrast, when the coefficient of \(y\) is nonzero, solving for \(y\) gives a slope form that is useful for graphing.
The line description also explains why checking a few points is not enough to define the graph. A point such as \((3,0)\) may satisfy \(2x+3y=6\), but the graph contains every point obtained by moving from it in the direction \(\begin{bmatrix}-3\\2\end{bmatrix}\), with any real scalar. The equation identifies the entire set; the points and direction are tools for drawing and understanding that set.
Check Your Understanding
For each question, use substitution to check any point you claim is on a graph.
- Find the x-intercept and y-intercept of \(4x+2y=8\), then describe how to graph the line.
- Does \((1,2)\) satisfy \(3x+y=5\)? Does \((0,5)\)? Show the substitutions.
- Describe the graph of \(y=4\). Is it horizontal or vertical, and what points could you plot to draw it?
- For \(2x-5y=0\), explain why the two intercepts do not give two distinct points. Use a direction vector to find another point on the graph.
- What is the solution set of \(0x+0y=3\)? Explain why the nontrivial-equation condition is needed for the line theorem.