Google Play badge

Solve systems of linear equations exactly and approximately (e.g., with graphs), focusing on pairs of linear equations in two variables.


Solve Systems of Linear Equations Exactly and Approximately

Two different rules can describe the same situation at once. A business might track both the total number of items sold and the total money collected. A traveler might know both total time and total distance. When two linear relationships must be true at the same time, you are dealing with a system of equations. The powerful idea is simple: the answer is the pair of values that satisfies both equations together.

Why systems matter

A single linear equation in two variables, such as \(2x + y = 10\), has infinitely many solutions. Every point on its line works. But when you place that equation together with another linear equation, such as \(x - y = 2\), the possibilities become much more specific. You are looking for values of \(x\) and \(y\) that make both equations true at the same time.

That pair of equations is called a system of linear equations. In this lesson, the focus is on pairs of linear equations in two variables, usually written with variables \(x\) and \(y\).

System of linear equations means two or more linear equations considered together.

Solution means an ordered pair \((x, y)\) that makes every equation in the system true.

Linear equation means an equation whose graph is a straight line.

Systems are central in algebra because they connect symbolic work, graphs, and real situations. They also train an important mathematical habit: testing whether one answer fits multiple conditions instead of just one.

Core meanings and possible outcomes

For two lines in a coordinate plane, there are only three basic possibilities. They may cross once, never cross, or lie exactly on top of each other. These cases tell you how many solutions the system has.

If two lines cross once, the system has exactly one solution. If they are parallel, the system has no solution. If they are the same line, the system has infinitely many solutions because every point on that line satisfies both equations.

In algebra language, a system with at least one solution is called consistent. A system with no solution is called inconsistent. A system with exactly one solution is often called independent, while a system with infinitely many solutions is called dependent.

Solving by graphing

[Figure 1] Graphing gives a visual meaning to a solution: the solution to a system is the point where the two lines intersect. If the crossing point lands exactly on a grid point, you may be able to read the solution exactly. If not, graphing usually gives an approximate solution.

To solve by graphing, write each equation in a graphable form, often slope-intercept form \(y = mx + b\), graph both lines on the same coordinate plane, and identify the intersection point. That point must satisfy both equations.

coordinate plane with two labeled lines crossing at a single highlighted intersection point, showing the graphical solution of a system
Figure 1: coordinate plane with two labeled lines crossing at a single highlighted intersection point, showing the graphical solution of a system

Suppose the system is \(y = 2x + 1\) and \(y = -x + 7\). On a graph, the lines cross at \((2, 5)\). You can confirm it algebraically: substituting \(x = 2\) into the first equation gives \(y = 2(2) + 1 = 5\), and substituting \(x = 2\) into the second gives \(y = -2 + 7 = 5\). So \((2, 5)\) is the solution.

Graphing is especially useful for estimating solutions or for understanding why a system has one, none, or infinitely many solutions. But because a drawn graph may not be perfectly precise, exact methods are usually preferred when the goal is an exact answer.

Worked example: solve approximately by graphing

Solve the system \(y = 0.5x + 1\) and \(y = -x + 4\).

Step 1: Recognize what to graph.

Both equations are already in slope-intercept form, so each can be graphed directly.

Step 2: Find the intersection.

On the graph, the lines meet near \((2, 2)\).

Step 3: Verify algebraically.

If \(x = 2\), then the first equation gives \(y = 0.5(2) + 1 = 2\). The second gives \(y = -2 + 4 = 2\).

The solution is \((2, 2)\). In this case the graph gives an exact grid-point answer, but many graphs only provide an approximation.

Later, when comparing methods, remember what the graph contributes: it shows the whole story at once. A single intersection means one shared solution.

Solving exactly by substitution

Substitution method means solving one equation for one variable and replacing that variable in the other equation. It is especially efficient when one equation is already written as \(x = \dots\) or \(y = \dots\), or when isolating a variable is easy.

The logic is straightforward. If \(y = 3x - 4\), then anywhere \(y\) appears in the other equation, you can replace it with \(3x - 4\). After that, the system becomes a one-variable equation, which you can solve exactly.

Worked example: solving by substitution

Solve the system \(y = 2x + 3\) and \(3x + y = 18\).

Step 1: Substitute the expression for \(y\).

Since \(y = 2x + 3\), replace \(y\) in the second equation:

\(3x + (2x + 3) = 18\).

Step 2: Solve for \(x\).

Combine like terms: \(5x + 3 = 18\).

Then \(5x = 15\), so \(x = 3\).

Step 3: Find \(y\).

Substitute \(x = 3\) into \(y = 2x + 3\):

\(y = 2(3) + 3 = 9\).

Step 4: Check in both equations.

First equation: \(9 = 2(3) + 3 = 9\).

Second equation: \(3(3) + 9 = 18\).

The exact solution is \((3, 9)\)

Substitution also works when you solve for \(x\) first instead of \(y\). The key is to substitute carefully, especially when expressions include negatives or fractions.

Solving exactly by elimination

Elimination method means adding or subtracting equations so that one variable is removed. This method is often the fastest when the coefficients of one variable are opposites or can easily be made opposites.

For example, if one equation contains \(+2y\) and the other contains \(-2y\), then adding the equations eliminates \(y\). If the coefficients do not already cancel, you can multiply one or both equations by a nonzero number first.

Worked example: elimination when a variable already cancels

Solve the system \(2x + y = 11\) and \(3x - y = 4\).

Step 1: Add the equations.

Because \(+y\) and \(-y\) are opposites, add vertically:

\[\begin{aligned} (2x + y) + (3x - y) &= 11 + 4 \\ 5x &= 15 \end{aligned}\]

Step 2: Solve for \(x\).

\(x = 3\).

Step 3: Substitute to find \(y\).

Use \(2x + y = 11\): \(2(3) + y = 11\), so \(6 + y = 11\), and \(y = 5\).

The exact solution is \((3, 5)\)

Now consider a case where you must prepare the equations before eliminating a variable.

Worked example: elimination after multiplying

Solve the system \(2x + 3y = 13\) and \(4x - 3y = 5\).

Step 1: Look for opposite coefficients.

The coefficients of \(y\) are \(+3\) and \(-3\), so adding the equations will eliminate \(y\).

Step 2: Add the equations.

\[\begin{aligned} (2x + 3y) + (4x - 3y) &= 13 + 5 \\ 6x &= 18 \end{aligned}\]

Step 3: Solve for \(x\).

\(x = 3\).

Step 4: Substitute to find \(y\).

Use \(2x + 3y = 13\): \(2(3) + 3y = 13\), so \(6 + 3y = 13\), then \(3y = 7\), and \(y = \dfrac{7}{3}\).

The exact solution is \[ \left(3, \frac{7}{3}\right) \]

Elimination is also useful when coefficients are not immediately convenient. For instance, if the equations are \(x + 2y = 7\) and \(3x - 2y = 5\), the \(y\)-terms already cancel by addition. But if they were \(x + 2y = 7\) and \(3x + y = 5\), you could multiply the second equation by \(-2\) or the first equation by a number that makes matching coefficients.

Special cases: one solution, no solution, infinitely many solutions

[Figure 2] The graph of a system can reveal all three outcomes: intersecting lines give one solution, parallel lines give no solution, and overlapping lines give infinitely many solutions. Algebra confirms the same idea when solving leads to a true statement or a contradiction.

If elimination or substitution produces a false statement such as \(0 = 5\), then the system has no solution. If the work produces a true statement such as \(0 = 0\), then the equations describe the same line and there are infinitely many solutions.

three small coordinate planes side by side showing intersecting lines, parallel lines, and overlapping lines for the three outcomes of a linear system
Figure 2: three small coordinate planes side by side showing intersecting lines, parallel lines, and overlapping lines for the three outcomes of a linear system

Worked example: a system with no solution

Solve the system \(2x + y = 4\) and \(4x + 2y = 11\).

Step 1: Compare the equations.

If the first equation were multiplied by \(2\), it would become \(4x + 2y = 8\), not \(4x + 2y = 11\).

Step 2: Eliminate a variable.

Multiply the first equation by \(-2\): \(-4x - 2y = -8\).

Add to the second equation:

\[\begin{aligned} (-4x - 2y) + (4x + 2y) &= -8 + 11 \\ 0 &= 3 \end{aligned}\]

Because \(0 = 3\) is false, the system has no solution.

Parallel lines have the same slope but different intercepts, so they never meet. That is the visual story behind the contradiction.

Worked example: a system with infinitely many solutions

Solve the system \(x + 2y = 6\) and \(2x + 4y = 12\).

Step 1: Notice the relationship.

The second equation is exactly \(2\) times the first equation.

Step 2: Eliminate a variable.

Multiply the first equation by \(-2\): \(-2x - 4y = -12\).

Add to the second equation:

\[\begin{aligned} (-2x - 4y) + (2x + 4y) &= -12 + 12 \\ 0 &= 0 \end{aligned}\]

Because \(0 = 0\) is always true, the system has infinitely many solutions. Both equations represent the same line.

When you revisit the graphing idea, these special cases make sense instantly. The algebra and graph tell the same story in different languages.

Choosing a method wisely

No single method is always best. Strong algebra students learn to choose strategically.

MethodBest used whenStrengthLimitation
GraphingYou want a visual model or an estimateShows the meaning of the solutionMay be approximate
SubstitutionOne equation is already solved for a variable, or easy to solveEfficient and exactCan become messy with fractions
EliminationCoefficients already cancel or can be made to cancel easilyFast and exactRequires careful arithmetic

Table 1. Comparison of common methods for solving systems of two linear equations.

For example, \(y = 4x - 1\) and \(2x + y = 9\) suggest substitution because one equation is already solved for \(y\). But \(3x + 2y = 8\) and \(5x - 2y = 12\) suggest elimination because the \(y\)-coefficients are opposites.

Airplane navigation, economics, and computer graphics all use systems of equations. Many more advanced problems begin by finding where two conditions are both true at once.

Graphing still has value even when you solve exactly by algebra. A quick sketch can help you predict whether the answer should be positive or negative, large or small, or whether the system might have no solution at all.

Applications in context

[Figure 3] Real problems often create two linear conditions whose intersection gives the answer, as in a ticket-sales situation. One equation may describe a total quantity, while the other describes total cost or total revenue. The ordered pair tells you the values of the two unknowns.

Suppose a school event sells student tickets and adult tickets. If \(x\) is the number of student tickets and \(y\) is the number of adult tickets, then one equation may represent total tickets sold, and another may represent total money collected.

graph of a ticket-sales system with one line for total tickets and one line for total revenue, intersection highlighted on labeled axes for student and adult ticket counts
Figure 3: graph of a ticket-sales system with one line for total tickets and one line for total revenue, intersection highlighted on labeled axes for student and adult ticket counts

Worked example: ticket sales application

A concert sells \(120\) tickets in total. Student tickets cost \(\$8\) and adult tickets cost \(\$12\). The total revenue is \(\$1{,}240\). How many of each ticket were sold?

Step 1: Define variables.

Let \(x\) be the number of student tickets and \(y\) be the number of adult tickets.

Step 2: Write a system.

Total tickets: \(x + y = 120\).

Total revenue: \(8x + 12y = 1240\).

Step 3: Solve by substitution.

From \(x + y = 120\), get \(x = 120 - y\).

Substitute into the revenue equation:

\(8(120 - y) + 12y = 1240\).

Then \(960 - 8y + 12y = 1240\), so \(960 + 4y = 1240\).

Thus \(4y = 280\), and \(y = 70\).

Step 4: Find the other variable.

\(x = 120 - 70 = 50\).

The solution is \((50, 70)\)

This means 50 student tickets and 70 adult tickets were sold.

The numbers must be interpreted in context. Here, \((50, 70)\) does not mean just any point. It specifically means \(50\) student tickets and \(70\) adult tickets. Units matter even when the equations do not display them directly.

Systems also appear in motion problems. If one equation represents total distance and another represents the relationship between two parts of a trip, solving the system gives distances, times, or speeds. In business, systems can model supply and demand or compare different payment plans.

Common mistakes and checking solutions

One common error is solving correctly for one variable but forgetting to substitute back to find the other. Another is arithmetic sign mistakes, especially when distributing negatives in substitution or when adding equations in elimination.

A good habit is to check every solution in both original equations. If you find \((x, y) = (4, 3)\), test it in both equations, not just one. A point that works in only one equation is not a solution to the system.

When graphing lines, recall that slope-intercept form is \(y = mx + b\), where \(m\) is the slope and \(b\) is the \(y\)-intercept. When solving one-variable equations, combine like terms, use inverse operations, and keep both sides balanced.

It is also smart to compare an algebraic answer with a rough graph. If your algebra says the solution is \((20, -50)\) but the graph suggests the lines intersect near \((2, 5)\), then something went wrong. Exact and approximate methods can support each other.

Finally, remember the big picture. A system is not just two separate equations. It is one mathematical question: where are these two linear relationships both true? Whether you use graphing, substitution, or elimination, you are always finding that shared point or proving that no such point exists.

Download Primer to continue