**2.2 Linear Equations in One Variable**

Topics covered in this section are:

- Solve equations in one variable algebraically.
- Solve a rational equation.
- Find a linear equation.
- Given the equations of two lines, determine whether their graphs are parallel or perpendicular.
- Write the equation of a line parallel or perpendicular to a given line.

Caroline is a full-time college student planning a spring break vacation. To earn enough money for the trip, she has taken a part-time job at the local bank that pays $\$15.00$/hr, and she opened a savings account with an initial deposit of $\$400$ on January 15. She arranged for direct deposit of her payroll checks. If spring break begins March 20 and the trip will cost approximately $\$2,500$, how many hours will she have to work to earn enough to pay for her vacation? If she can only work $4$ hours per day, how many days per week will she have to work? How many weeks will it take? In this section, we will investigate problems like this and others, which generate graphs like the line in Figure 1.

**2.2.1 Solving Linear Equations in One Variable**

A **linear equation** is an equation of a straight line, written in one variable. The only power of the variable is $1$. Linear equations in one variable may take the form $ax+b=0$ and are solved using basic algebraic operations.

We begin by classifying linear equations in one variable as one of three types: identity, conditional, or inconsistent. An **identity equation** is true for all values of the variable. Here is an example of an identity equation.

$3x=2x+x$

The **solution set** consists of all values that make the equation true. For this equation, the solution set is all real numbers because any real number substituted for $x$ will make the equation true.

A **conditional equation** is true for only some values of the variable. For example, if we are to solve the equation $5x+2=3x-6$, we have the following:

$\begin{align*} 5x+2&=3x-6 \\ 2x&=-8 \\ x&=-4 \end{align*}$

The solution set consists of one number: ${−4}$. It is the only solution and, therefore, we have solved a conditional equation.

An **inconsistent equation** results in a false statement. For example, if we are to solve $5x−15=5(x−4)$, we have the following:

$5x-15=5x-20$ | |

$5x-15-5x=5x-20-5x$ | Subtract $5x$ from both sides. |

$-15≠-20$ | False statement |

Indeed, $-15≠-20$. There is no solution because this is an inconsistent equation.

Solving linear equations in one variable involves the fundamental properties of equality and basic algebraic operations. A brief review of those operations follows.

**LINEAR EQUATION IN ONE VARIABLE**

A linear equation in one variable can be written in the form

$ax+b=0$

where $a$ and $b$ are real numbers, $a≠0$.

**HOW TO: Given a linear equation in one variable, use algebra to solve it.**

The following steps are used to manipulate an equation and isolate the unknown variable, so that the last line reads $x=$_________, if $x$ is the unknown. There is no set order, as the steps used depend on what is given:

- We may add, subtract, multiply, or divide an equation by a number or an expression as long as we do the same thing to both sides of the equal sign. Note that we cannot divide by zero.
- Apply the distributive property as needed: $a(b+c)=ab+ac$.
- Isolate the variable on one side of the equation.
- When the variable is multiplied by a coefficient in the final stage, multiply both sides of the equation by the reciprocal of the coefficient.

**Example 1**

Solve the following equation: $2x+7=19$.

**Solution**

This equation can be written in the form $ax+b=0$ by subtracting $19$ from both sides. However, we may proceed to solve the equation in its original form by performing algebraic operations.

$\begin{align*} 2x+7&=19 \\ 2x&=12 \\ x&=6 \end{align*}$ | Subtract $7$ from both sides. Multiply both sides by $\frac{1}{2}$ or divide by $2$. |

The solution is $6$.

**Example 2**

Solve the following equation: $4(x-3)+12=15-5(x+6)$.

**Solution**

Apply standard algebraic properties.

$\begin{align*} 4(x-3)+12&=15-5(x+6) \\ 4x-12+12&=15-5x-30 \\ 4x&=-15-5x \\ 9x&=-15 \\ x&=-\frac{15}{9} \\ x&=-\frac{5}{3} \end{align*}$ | Apply the distributive property. Combine like terms. Place $x$-terms on one side and simplify. Multiply both sides by $\frac{1}{9}$, the reciprocal of $9$. |

This problem requires the distributive property to be applied twice, and then the properties of algebra are used to reach the final line, $x=-\frac{5}{3}$.

**2.2.2 Solving a Rational Equation**

In this section, we look at rational equations that, after some manipulation, result in a linear equation. If an equation contains at least one rational expression, it is a considered a **rational equation**.

Recall that a rational number is the ratio of two numbers, such as $\frac{2}{7}$ or $\frac{7}{2}$. A rational expression is the ratio, or quotient, of two polynomials. Here are three examples.

$\frac{x+1}{x^{2}-4}$, $\frac{1}{x-3}$, or $\frac{4}{x^{2}+x-2}$

Rational equations have a variable in the denominator in at least one of the terms. Our goal is to perform algebraic operations so that the variables appear in the numerator. In fact, we will eliminate all denominators by multiplying both sides of the equation by the least common denominator (LCD).

Finding the LCD is identifying an expression that contains the highest power of all of the factors in all of the denominators. We do this because when the equation is multiplied by the LCD, the common factors in the LCD and in each denominator will equal one and will cancel out.

**Example 3**

Solve the rational equation: $\frac{7}{2x} – \frac{5}{3x}= \frac{22}{3}$.

**Solution**

We have three denominators; $2x$, $3x$, and $3$. The LCD must contain $2x$, $3x$, and $3$. An LCD of $6x$ contains all three denominators. In other words, each denominator can be divided evenly into the LCD. Next, multiply both sides of the equation by the LCD $6x$.

$\begin{align*} (6x)(\frac{7}{2x} -\frac{5}{3x})&= (\frac{22}{3})(6x) \\ (6x)(\frac{7}{2x}) – (6x)(\frac{5}{3x}) &= (\frac{22}{3})(6x) \\ (\cancel{6x})(\frac{7}{\cancel{2x}}) – (\cancel{6x})(\frac{5}{\cancel{3x}}) &= (\frac{22}{\cancel{3}}) (\cancel{6}x) \\ 3(7)-2(5) &= 22(2x) \\ 21-10 &= 44x \\ 11&=4x \\ \frac{11}{44} &=x \\ \frac{1}{4} &= x \end{align*}$ | Use the distributive property. Cancel out the common factors. Multiply remaining factors by each numerator. |

A common mistake made when solving rational equations involves finding the LCD when one of the denominators is a binomial—two terms added or subtracted—such as $(x+1)$. Always consider a binomial as an individual factor—the terms cannot be separated. For example, suppose a problem has three terms and the denominators are $x$, $x-1$, and $3x-3$. First, factor all denominators. We then have $x$, $(x-1)$, and $3(x-1)$ as the denominators. Only the last two denominators have a common factor of $(x-1)$. The $x$ in the first denominator is separate from the $x$ in the $(x-1)$ denominators. An effective way to remember this is to write factored and binomial denominators in parentheses, and consider each parentheses as a separate unit or a separate factor. The LCD in this instance is found by multiplying together the $x$, one factor of $(x-1)$, and the $3$. Thus, the LCD is the following:

$x(x-1)3=3x(x-1)$

So, both sides of the equation would be multiplied by $3x(x−1)$. Leave the LCD in factored form, as this makes it easier to see how each denominator in the problem cancels out.

Another example is a problem with two denominators, such as $x$ and $x^{2}+2x$. Once the second denominator is factored as $x^{2}+2x=x(x+2)$, there is a common factor of $x$ in both denominators and the LCD is $x(x+2)$.

Sometimes we have a rational equation in the form of a proportion; that is, when one fraction equals another fraction and there are no other terms in the equation.

$\frac{a}{b} = \frac{c}{d}$

We can use another method of solving the equation without finding the LCD: cross-multiplication. We multiply terms by crossing over the equal sign.

Multiply $a(d)$ and $b(c)$, which results in $ad=bc$.

Any solution that makes a denominator in the original expression equal zero must be excluded from the possibilities.

**RATIONAL EQUATIONS**

A **rational equation** contains at least one rational expression where the variable appears in at least one of the denominators.

**HOW TO: Given a rational equation, solve it.**

- Factor all denominators in the equation.
- Find and exclude values that set each denominator equal to zero.
- Find the LCD.
- Multiply the whole equation by the LCD. If the LCD is correct, there will be no denominators left.
- Solve the remaining equation.
- Make sure to check solutions back in the original equations to avoid a solution producing zero in a denominator.

**Example 4**

Solve the following rational equation: $\frac{2}{x} – \frac{3}{2} = \frac{7}{2x}$.

**Solution**

We have three denominators: $x$, $2$, and $2x$. No factoring is required. The product of the first two denominators is equal to the third denominator, so, the LCD is $2x$. Only one value is excluded from a solution set, $0$. Next, multiply the whole equation (both sides of the equal sign) by $2x$.

$\begin{align*} 2x(\frac{2}{x}-\frac{3}{2}) &= (\frac{7}{2x})2x \\ 2\cancel{x} (\frac{2}{\cancel{x}})- \cancel{2}x(\frac{3}{\cancel{2}}) &= (\frac{7}{\cancel{2x}}) \cancel{2x} \\ 2(2)-3x&= 7 \\ 4-3x&=7 \\ -3x&=3 \\ x&=-1 \end{align*}$ | Distribute $2x$. Denominators cancel out. |

The proposed solution is $-1$, which is not an excluded value, so the solution set contains one number $-1$, or {$-1$} written in set notation.

**Example 5**

Solve the following rational equation: $\frac{1}{x} = \frac{1}{10} – \frac{3}{4x}$.

**Solution**

First find the common denominator. The three denominators in factored form are $x$, $10=2 \cdot 5$, and $4x=2 \cdot 2\cdot x$. The smallest expression that is divisible by each one of the denominators is $20x$. $x=0$ is an excluded value. Multiply the whole equation by $20x$.

$\begin{align*} 20x(\frac{1}{x}) &= (\frac{1}{10} – \frac{3}{4x})20x \\ 20&= 2x-15 \\ 35 &=2x \\ \frac{35}{2} &= x \end{align*}$

The solution is $\frac{35}{2}$.

**Example 6**

Solve the following rational equations and state the excluded values:

- $\frac{3}{x-6}=\frac{5}{x}$
- $\frac{x}{x-3} = \frac{5}{x-3} – \frac{1}{2}$
- $\frac{x}{x-2} = \frac{5}{x-2} – \frac{1}{2}$

**Solution**

**Part 1 **

The denominators $x$ and $x−6$ have nothing in common. Therefore, the LCD is the product $x(x−6)$. However, for this problem, we can cross-multiply.

$\begin{align*} \frac{3}{x-6} &= \frac{5}{x} \\ 3x&=5(x-6) \\ 3x&=5x-30 \\ -2x&=-30 \\ x&=15 \end{align*}$

The solution is $15$. The excluded values are $6$ and $0$.

**Part 2**

The LCD is $2(x-3)$. Multiply both sides of the equation by $2(x-3)$.

$\begin{align*} 2(x-3)(\frac{x}{x-3}) &= (\frac{5}{x-3} -\frac{1}{2}) 2(x-3) \\ \frac{2\cancel{(x-3)}}{\cancel{x-3}} &= \frac{2\cancel{(x-3)}5}{\cancel{x-3}} -\frac{\cancel{2}(x-3)}{\cancel{2}} \\ 2x&=10-(x-3) \\ 2x&=10-x+3 \\ 2x&=13-x \\ 3x&=13 \\ x&=\frac{13}{3} \end{align*}$

The solution is $\frac{13}{3}$. The excluded value is $3$.

**Part 3**

The least common denominator is $2(x-2)$. Multiply both sides of the equation by $x(x-2)$.

$\begin{align*} 2(x-2)(\frac{x}{x-2}) &=(\frac{5}{x-2} – \frac{1}{2})2(x-2) \\ 2x&=10-(x-2) \\ 2x&=12-x \\3x&=12 \\ x&=4 \end{align*}$

The solution is $4$. The excluded value is $2$.

**Example 7**

Solve the rational equation after factoring the denominators: $\frac{2}{x+1}-\frac{1}{x-1}=\frac{2x}{x^{2}-1}$. State the excluded values.

**Solution**

We must factor the denominator $x^{2}−1$. We recognize this as the difference of squares, and factor it as $(x−1)(x+1)$. Thus, the LCD that contains each denominator is $(x−1)(x+1)$. Multiply the whole equation by the LCD, cancel out the denominators, and solve the remaining equation.

$\begin{align*} (x-1)(x+1)(\frac{2}{x+1} – \frac{1}{x-1}) &= (\frac{2x}{(x-1)(x+1)})(x-1)(x+1) \\ 2(x-1)-1(x+1)&=2x \\ 2x-2-x-1 &=2x \\ x-3 &=2x \\ -3&=x \end{align*}$

The solution is $-3$. The excluded values are $1$ and $-1$.

**2.2.3 Finding a Linear Equation**

Perhaps the most familiar form of a linear equation is the slope-intercept form, written as $y=mx+b$, where $m=$slope and $b=y$-intercept. Let us begin with the slope.

#### The Slope of a Line

The **slope** of a line refers to the ratio of the vertical change in *y* over the horizontal change in $x$ between any two points on a line. It indicates the direction in which a line slants as well as its steepness. Slope is sometimes described as rise over run.

$m=\frac{y_2 – y_1}{x_2 – x_1}$

If the slope is positive, the line slants to the right. If the slope is negative, the line slants to the left. As the slope increases, the line becomes steeper. Some examples are shown in Figure 2. The lines indicate the following slopes: $m=-3$, $m=2$, and $m=\frac{1}{3}$.

**THE SLOPE OF A LINE**

The slope of a line, $m$, represents the change in *y* over the change in $x$.Given two points, $(x1, y1)$ and $(x2, y2)$, the following formula determines the slope of a line containing these points:

$m=\frac{y_2 – y_1}{x_2 – x_1}$

**Example 8**

Find the slope of a line that passes through the points $(2, -1)$ and $(-5, 3)$.

**Solution**

We substitute the $y$-values and the $x$-values into the formula.

$\begin{align*} m&=\frac{3-(-1)}{-5-2} \\ &=\frac{4}{-7} \\ &=-\frac{4}{7} \end{align*}$

The slope is $-\frac{4}{7}$.

**Analysis**

It does not matter which point is called $(x_1, y_1)$ or $(x_2, y_2)$. As long as we are consistent with the order of the $y$ terms and the order of the $x$ terms in the numerator and denominator, the calculation will yield the same result.

**Example 9**

Identify the slope and $y$-intercept, given the equation $y=-\frac{3}{4}x – 4$.

**Solution**

As the line is in $y=mx+b$ form, the given line has a slope of $m=-\frac{3}{4}$. The $y$-intercept is $b=-4$.

**Analysis**

The $y$-intercept is the point at which the line crosses the $y$-axis. On the $y$-axis, $x=0.$ We can always identify the $y$-intercept when the line is in slope-intercept form, as it will always equal $b$. Or, just substitute $x=0$ and solve for $y$.

#### The Point-Slope Formula

Given the slope and one point on a line, we can find the equation of the line using the point-slope formula.

$y-y_1=m(x-x_1)$

This is an important formula, as it will be used in other areas of college algebra and often in calculus to find the equation of a tangent line. We need only one point and the slope of the line to use the formula. After substituting the slope and the coordinates of one point into the formula, we simplify it and write it in slope-intercept form.

**THE POINT-SLOPE FORMULA**

Given one point and the slope, the point-slope formula will lead to the equation of a line:

$y-y_1=m(x-x_1)$

**Example 10**

Write the equation of the line with slope $m=-3$ and passing through the point $(4, 8)$. Write the final equation in slope-intercept form.

**Solution**

Using the point-slope formula, substitute $-3$ for $m$ and the point $(4, 8)$ for $(x_1, y_1)$.

$\begin{align*} y-y_1&=m(x-x_1) \\ y-8 &=-3(x-4) \\ y-8 &= -3x+12 \\ y &=-3x+20 \end{align*}$

**Analysis **

Note that any point on the line can be used to find the equation. If done correctly, the same final equation will be obtained.

**Example 11**

Find the equation of the line passing through the points $(3, 4)$ and $(0, -3)$. Write the final equation in slope-intercept form.

**Solution**

First, we calculate the slope using the slope formula and two points.

$\begin{align*} m &= \frac{-3-4}{0-3} \\ &= \frac{-7}{-3} \\ &=\frac{7}{3} \end{align*}$

Next, we use the point-slope formula with the slope of $\frac{7}{3}$, and either point. Let’s pick the point $(3, 4)$ for $(x_1, y_1)$.

$\begin{align*} y-4 &= \frac{7}{3}(x-3) \\ y-4 &= \frac{7}{3}x-7 \\ y&=\frac{7}{3}x-3 \end{align*}$

In slope-intercept form, the equation is written as $y=\frac{7}{3}x-3$.

**Analysis**

To prove that either point can be used, let us use the second point $(0, -3)$ and see if we get the same equation.

$\begin{align*} y-(-3) &= \frac{7}{3}(x-0) \\ y+3 &= \frac{7}{3}x \\ y&=\frac{7}{3}x-3 \end{align*}$

We see that the same line will be obtained using either point. This makes sense because we used both points to calculate the slope.

**Standard Form of a Line**

Another way that we can represent the equation of a line is in standard form. Standard form is given as

$Ax+By=C$

where $A$, $B$, and $C$ are integers. The $x$- and $y$-terms are on one side of the equal sign and the constant term is on the other side.

**Example 12**

Find the equation of the line with $m=-6$ and passing through the point $(\frac{1}{4}, -2)$. Write the equation in standard form.

**Solution**

We begin using the point-slope formula.

$\begin{align*} y-(-2) &= -6(x-\frac{1}{4}) \\ y+2 &= -6x+\frac{3}{2} \end{align*}$

From here, we multiply through by $2$, as no fractions are permitted in standard form, and then move both variables to the left aside of the equal sign and move the constants to the right.

$\begin{align*} 2(y+2) &= (-6x+\frac{3}{2})2 \\ 2y+4 &= -12x+3 \\ 12x+2y&=-1 \end{align*}$

This equation is now written in standard form.

**Vertical and Horizontal Lines**

The equations of vertical and horizontal lines do not require any of the preceding formulas, although we can use the formulas to prove that the equations are correct. The equation of a vertical line is given as

$x=c$

where $c$ is a constant. The slope of a vertical line is undefined, and regardless of the $y$-value of any point on the line, the $x$-coordinate of the point will be $c$.

Suppose that we want to find the equation of a line containing the following points: $(-3, -5)$, $(-3, 1)$, $(-3, 3)$, and $(-3, 5)$. First, we will find the slope.

$m-\frac{5-3}{-3-(-3)} = \frac{2}{0}$

Zero in the denominator means that the slope is undefined and, therefore, we cannot use the point-slope formula. However, we can plot the points. Notice that all of the $x$-coordinates are the same and we find a vertical line through $x=−3$. See Figure 3.

The equation of a horizontal line is given as

$y=c$

where $c$ is a constant. The slope of a horizontal line is zero, and for any $x$-value of a point on the line, the *y-*coordinate will be $c$.

Suppose we want to find the equation of a line that contains the following set of points: $(-2, -2)$, $(0, -2)$, $(3, -2)$, and $(5, -2)$. We can use the point-slope formula. First, we find the slope using any two points on the line.

$\begin{align*} m &= \frac{-2-(-2)}{0-(-2)} \\ &= \frac{0}{2} \\ &= 0 \end{align*}$

Use any point for $(x_1, y_1)$ in the formula, or use the $y$-intercept.

$\begin{align*} y-(-2) &= 0(x-3) \\ y+2 &= 0 \\ y &= -2 \end{align*}$

The graph is a horizontal line through $y=-2$. Notice that all of the $y$-coordinates are the same. See Figure 3.

**Example 13**

Find the equation of the line passing through the given points: $(1, -3)$ an $(1, 4)$.

**Solution**

The $x$-coordinate of both points is $1$. Therefore, we have a vertical line, $x=1$.

**2.2.4 Determining Whether Graphs of Lines are Parallel or Perpendicular**

Parallel lines have the same slope and different $y$-intercepts. Lines that are parallel to each other will never intersect. For example, Figure 4 shows the graphs of various lines with the same slope, $m=2$.

All of the lines shown in the graph are parallel because they have the same slope and different $y$-intercepts.

Lines that are perpendicular intersect to form a $90º$ -angle. The slope of one line is the negative reciprocal of the other. We can show that two lines are perpendicular if the product of the two slopes is $−1$: $m_1 \cdot m_2=-1$. For example, Figure 5 shows the graph of two perpendicular lines. One line has a slope of $3$; the other line has a slope of $-\frac{1}{3}$.

$m_1 \cdot m_2 = -1$

$3 \cdot (-\frac{1}{3}) = -1$

**Example 14**

Graph the equations of the given lines, and state whether they are parallel, perpendicular, or neither: $3y=-4x+3$ and $3x-4y=8$.

**Solution**

The first thing we want to do is rewrite the equations so that both equations are in slope-intercept form.

First equation:

$\begin{align*} 3y&=-4x+3 \\ y&=-\frac{4}{3}x+1 \end{align*}$

Second equation:

$\begin{align*} 3x-4y&=8 \\ -4y&=-3x+8 \\ y&= \frac{3}{4}x -2 \end{align*}$

See the graph of both lines in Figure 6.

From the graph, we can see that the lines appear perpendicular, but we must compare the slopes.

$\begin{align*} m_1 &=-\frac{4}{3} \\ m_2 &= \frac{3}{4} \\ m_1 \cdot m_2 &= (-\frac{4}{3})(\frac{3}{4}) = -1 \end{align*}$

The slopes are negative reciprocals of each other, confirming that the lines are perpendicular.

**2.2.5 Writing the Equations of Lines Parallel or Perpendicular to a Given Line**

As we have learned, determining whether two lines are parallel or perpendicular is a matter of finding the slopes. To write the equation of a line parallel or perpendicular to another line, we follow the same principles as we do for finding the equation of any line. After finding the slope, use the point-slope formula to write the equation of the new line.

**HOW TO: Given an equation for a line, write the equation of a line parallel or perpendicular to it.**

- Find the slope of the given line. The easiest way to do this is to write the equation in slope-intercept form.
- Use the slope and the given point with the point-slope formula.
- Simplify the line to slope-intercept form and compare the equation to the given line.

**Example 15**

Write the equation of the line parallel to $5x+3y=1$ and passing through the point $(3, 5)$.

**Solution**

First, we will write the equation in slope-intercept form to find the slope.

$\begin{align*} 5x+3y&=1 \\ 3y&=-5x+1 \\ y&=-\frac{5}{3}x+\frac{1}{3} \end{align*}$

The slope is $m=-\frac{5}{3}$. The $y$-intercept is $\frac{1}{3}$, but that really does not enter into our problem, as the only thing we need for two lines to be parallel is the same slope. The one exception is that if the *y-*intercepts are the same, then the two lines are the same line. The next step is to use this slope and the given point with the point-slope formula.

$\begin{align*} y-5&=-\frac{5}{3}(x-3) \\ y-5&=-\frac{5}{3}x+5 \\ y&=-\frac{5}{3}x+10 \end{align*}$

The equation of the line is $y=-\frac{5}{3}x+10$. See Figure 7.

**Example 16**

Find the equation of the line perpendicular to $5x-3y+4=0$ and passing through the point $(-4, 1)$.

**Solution**

The first step is to write the equation in slope-intercept form.

$\begin{align*} 5x-3y+4&=0 \\ -3y&=-5x-4 \\ y&=\frac{5}{3}x+\frac{4}{3} \end{align*}$

We see that the slope is $m=\frac{5}{3}$. This means that the slope of the line perpendicular to the given line is the negative reciprocal, or $-\frac{3}{5}$. Next, we use the point-slope formula with this new slope and the given point.

$\begin{align*} y-1 &=-\frac{3}{5}(x-(-4)) \\ y-1 &=-\frac{3}{5}x-\frac{12}{5} \\ y&= -\frac{3}{5}x – \frac{12}{5} + \frac{5}{5} \\ y&=-\frac{3}{5}x-\frac{7}{5} \end{align*}$

The equation of the line is $y=-\frac{3}{5}x-\frac{7}{5}$.

*Licenses & Attributions*

*Licenses & Attributions*

*CC Licensed Content, Original*

*Revision and Adaption. Provided by: Minute Math. License: CC BY 4.0*

*CC Licensed Content, Shared Previously*

*Abramson, J. (2015). Linear Equations in One Variable. In College Algebra. OpenStax. https://openstax.org/books/college-algebra/pages/2-2-linear-equations-in-one-variable*.*License: CC BY 4.0. Access for free at https://openstax.org/books/college-algebra/pages/1-introduction-to-prerequisites*.