Tutorials › Linear Algebra › A Single Linear Equation as a Line in R2

Linear Systems and Solution Sets · Tutorial 11 of 1000

A Single Linear Equation as a Line in R2

Turn a single linear equation in two variables into a graph, and describe every point on its line.

Beginner 9 min read

What You'll Learn

  • Identify when a linear equation in two variables is nontrivial.
  • Describe a line as a point plus all scalar multiples of a direction vector.
  • Prove that the solutions of a nontrivial equation form a line.
  • Find and interpret intercepts, including the case when they coincide.
  • Graph equations with nonzero slope, and recognize vertical and horizontal lines.
  • Check proposed points by substitution.

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.

Definition: The equation \(ax+by=c\) is nontrivial if \(a\) and \(b\) are not both zero. Its graph is its solution set in \(\mathbb{R}^2\): all points \((x,y)\) satisfying the equation. A line in \(\mathbb{R}^2\) can be described as the set of points \(\mathbf{p}+t\mathbf{d}\), where \(\mathbf{p}\in\mathbb{R}^2\) is a fixed point, \(\mathbf{d}\in\mathbb{R}^2\) is a fixed nonzero direction vector, and \(t\) ranges over all real numbers.

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.

Theorem: If \(a,b,c\in\mathbb{R}\) and \(a,b\) are not both zero, then the solution set of \(ax+by=c\) is a line in \(\mathbb{R}^2\). More precisely, choose a solution \(\mathbf{p}\). The solution set is $$ \left\{\mathbf{p}+t\begin{bmatrix}-b\\a\end{bmatrix}:t\in\mathbb{R}\right\}. $$

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.

Result: For \(ax+by=c\) with \(a,b\) not both zero: if \(b\ne0\), its graph is \(y=-(a/b)x+c/b\); if \(b=0\), its graph is the vertical line \(x=c/a\); and if \(a=0\), its graph is the horizontal line \(y=c/b\). The vertical case has \(a\ne0\), and the horizontal case has \(b\ne0\).

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.

  1. Find the x-intercept and y-intercept of \(4x+2y=8\), then describe how to graph the line.
  2. Does \((1,2)\) satisfy \(3x+y=5\)? Does \((0,5)\)? Show the substitutions.
  3. Describe the graph of \(y=4\). Is it horizontal or vertical, and what points could you plot to draw it?
  4. 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.
  5. What is the solution set of \(0x+0y=3\)? Explain why the nontrivial-equation condition is needed for the line theorem.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon