If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Solving systems of linear equations | Lesson

A guide to solving systems of linear equations on the digital SAT

What are systems of linear equations?

A system of linear equations is usually a set of two linear equations with two variables.
  • x+y=5 and 2xy=1 are both linear equations with two variables.
  • When considered together, they form a system of linear equations.
A linear equation with two variables has an infinite number of solutions (for example, consider how (0,5), (1,4), (2,3), etc. are all solutions to the equation x+y=5). However, systems of two linear equations with two variables can have a single solution that satisfies both solutions.
  • (2,3) is the only solution to both x+y=5 and 2xy=1.
In this lesson, we'll:
  1. Look at two ways to solve systems of linear equations algebraically: substitution and elimination.
  2. Look at systems of linear equations graphically to help us understand when systems of linear equations have one solution, no solutions, or infinitely many solutions.
  3. Explore algebraic methods of identifying the number of solutions that exist for systems with two linear equations.
You can learn anything. Let's do this!

How do I solve systems of linear equations by substitution?

Systems of equations with substitution

Khan Academy video wrapper
Systems of equations with substitution: 2y=x+7 & x=y-4See video transcript

How does substitution work?

Our goal when solving a system of equations is to reduce two equations with two variables down to a single equation with one variable. Since each equation in the system has two variables, one way to reduce the number of variables in an equation is to substitute an expression for a variable.
Consider the following example:
x=2yx+y=3
In a system of equations, both equations are simultaneously true. In other words, since the first equation tells us that x is equal to 2y, the x in the second equation is also equal to 2y. Therefore, we can plug in 2y as a substitute for x in the second equation:
x+y=3(2y)+y=33y=3
From here, we can solve the equation 3y=3, then use the value of y to calculate x.
To solve a system of equations using substitution:
  1. Isolate one of the two variables in one of the equations.
  2. Substitute the expression that is equal to the isolated variable from Step 1 into the other equation. This should result in a linear equation with only one variable.
  3. Solve the linear equation for the remaining variable.
  4. Use the solution of Step 3 to calculate the value of the other variable in the system by using one of the original equations.

Let's look at some more examples!

y=3x14x+y=8
What is the solution (x,y) to the system of equations above?

x2y=27x3y=19
What is the solution (x,y) to the system of equations above?

Try it!

TRY: Follow the steps for substitution
y=2x4x+y=2
In the system of equations above, the first equation tells us that y is equal to 2x. This means we can replace the y in the second equation with
to reduce the equation to a linear equation with a single variable.
Next, we can solve the equation 3x+2=2 for x. The value of x is
.
Finally, since y=2x, we can substitute the value of x into the equation to calculate y. The value of y is
.


How do I solve systems of linear equations by elimination?

System of equations with elimination

Khan Academy video wrapper
Systems of equations with elimination: x+2y=6 & 4x-2y=14See video transcript

How does elimination work?

Our goal when solving a system of equations is to reduce two equations with two variables down to a single equation with one variable. Since each equation in the system has two variables, one way to reduce the number of variables is to add or subtract the two equations in the system to cancel out, or eliminate, one of the variables.
Consider the following system of equations:
3xy=72x+y=8
Recall that when we're solving equations, we can perform the same operations to both sides of the equation and maintain the equality. Since the second equation tells us that 2x+y is equal to 8, we can add 2x+y to the left side of the first equation, add 8 to the right side of the first equation, and maintain the equality:
3xy=7+ 2x+y=85x+0=15
Notice that the y-terms cancel out and are eliminated as a result of adding the two equations. When solving systems of equations using elimination, we're always looking for opportunities to cancel out terms.
  • If two terms have the opposite coefficients like in the system above (y and y), we can add the two equations to cancel the terms.
  • If two terms have the same coefficients, we can subtract the two equations to cancel the terms.
From here, we can solve the equation 5x=15, then use the value of x to calculate y.
Sometimes, the system of equations does not have coefficients that readily cancel out. Consider this example:
3xy=7x+2y=21
In this case, we need to find ways to match a pair of coefficients by rewriting one of the equations. There are two ways to do this.
Option 1: We can set the system up for eliminating the y-terms through addition by multiplying both sides of the first equation by 2.
(3xy)2=726x2y=14
From here, we can add the second equation to eliminate the y-terms:
6x2y=14+  x+2y=217x+0=35
Option 2: We can also set the system up for eliminating the x-terms through subtraction by multiplying both sides of the second equation by 3.
(x+2y)3=2133x+6y=63
From here, we can subtract the equation from the first equation to eliminate the x-terms:
3x  y=7(3x+6y=63)07y=56
To solve a system of equations using elimination:
  1. Identify a pair of terms in the system that have both the same variable and coefficients with the same magnitude (ex: 2x and 2x, or 3y and 3y). If necessary, rewrite one or both equations so that a pair of terms have both the same variable and coefficients with the same magnitude.
  2. Add or subtract the two equations in the system to eliminate the terms identified in Step 1. This should result in a linear equation with only one variable.
  3. Solve the linear equation to obtain a value for the variable.
  4. Now that you have figured out the value of one variable, plug that value into either equation to find the value of the other variable.

Let's look at some more examples!

3x+2y=102x2y=5
What is the solution (x,y) to the system of equations above?

3x+2y=104xy=6
What is the solution (x,y) to the system of equations above?

Try it!

TRY: spot the mistake for elimination
5x+3y=343x+3y=30
The solution steps to the system of equations above are shown in order below. Select the earliest mistake in the solution steps, if any.
Choose 1 answer:


When do I use substitution, and when do I use elimination?

It's up to you!

All systems of linear equations can be solved with either substitution or elimination. On test day, you should use whichever method you're more comfortable with.
Substitution is sometimes easier when:
  • A variable is already isolated: x=4y+1
  • You can isolate a variable in a single step: 3x+y=7
Elimination is sometimes easier when:
  • Both equations contain an identical term: 2x+3y=11 and 2x+7y=23
  • The equations contain opposite terms: 2x+2y=7 and 5x2y=14
  • An equation contains a term that is an integer multiple of a term in the other equation: 3x+4y=26 and 5x+2y=20.

Try it!

TRY: Identify multiple ways to solve a system of equations
7x+y=203x=y
Consider the system of equations above. Which of the following can be used to solve the system of equations, and how?
Choose 2 answers:


TRY: Identify multiple ways to solve a system of equations
3x+5y=172x10y=38
Consider the system of equations above. Which of the following can be used to solve the system of equations, and how?
Choose 2 answers:


Self-reflection

Even though we can solve the systems of equations above using either substitution or elimination, ask yourself these questions:
  • For each system, which solution method came to mind first?
  • How comfortable am I with isolating variables?
  • How comfortable am I with multiplying both sides of an equation by a constant?
  • How comfortable am I with adding and subtracting two linear equations?
  • How comfortable am I with making more complex substitutions, e.g., substituting for 5y instead of y?
  • How comfortable am I with finding least common multiples and using them to set up eliminations?
Your answers to these questions should inform which method you use.

What is the relationship between lines and the number of solutions to systems of linear equations?

Linear systems by graphing

Khan Academy video wrapper
Number of solutions to a system of equationsSee video transcript

Intersections and number of solutions

A linear equation can be represented by a line in the xy-plane. The solution to a system of linear equations is the point at which the lines representing the linear equations intersect.
Two lines in the xy-plane can intersect once, never intersect, or completely overlap. Each of these scenarios corresponds to a different number of solutions to the system of equations the two lines represent.
  • If the two lines have two different slopes, then they will intersect once. Therefore, the system of equations has exactly one solution.
  • If the two lines have the same slope but different y-intercepts, then they are parallel lines, and they will never intersect. Therefore, we can say that the system of equations has no solutions.
  • If the two lines have the same slope and the same y-intercept, then they will completely overlap—they are the same line!. When this is the case, we say that the system has infinitely many solutions.

Try it!

TRY: Determine the number of solutions from a graph
Two lines are graphed in the xy-plane. One line has a slope of -0.5 and a y-intercept of 3. The other line has a slope of 1 and a y-intercept of -3. The two lines intersect at the point (4, 1).
The two lines in the xy-plane above represent a system of linear equations. Because the two lines have
, they
, and the system they represent has
.


How do I determine the number of solutions for systems of linear equations?

How to determine the number of solutions to a system of equations algebraically

Khan Academy video wrapper
Number of solutions to a system of equations algebraicallySee video transcript

How do I identify the number of solutions?

In the previous section, we covered the graphical method of determining the number of solutions to a system of linear equations. However, when we don't have the aid of a graph, we can determine the number of solutions algebraically.
One way to do it is to rewrite both equations in slope-intercept form, y=mx+b. This allows us to compare the slopes of the lines, m, and their y-intercepts, b, to determine the number of solutions.
  • If the two equations have different m-values, then the system has one solution.
  • If the two equations have the same m-value but different b-values, then the system has no solution.
  • If the two equations have both the same m-value and the same b-value, then the system has infinitely many solutions.
To determine the number of solutions a system of linear equations has using slope-intercept form, y=mx+b:
  1. Rewrite both equations in slope-intercept form.
  2. Compare the m- and b-values of the equations to determine the number of solutions.

Let's look at an example!

13y=x+2y=3x+6
How many solutions does the system of equations above have?

Try it!

TRY: Identify the number of solutions in slope-intercept form
y=3x1y=3x1
In the system of equations above, the two equations have
and
. Therefore, the system has
.


Your turn!

Practice: Solve a system of linear equations using substitution
y=x23x+5y=30
If (x,y) is a solution to the system of equations above, what is the value of x ?
Choose 1 answer:


Practice: Solve a system of linear equations using elimination
4x+2y=22xy=9
The system of equations above has solution (x,y). What is the value of y ?
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi


Practice: Solve a system of linear equations
2xy=123x7y=7
Which ordered pair (x,y) satisfies the system of equations shown above?
Choose 1 answer:


Practice: Determine the condition for no solution
ax3y=21bx3y=11
The system of equations above has no solutions. If a and b are positive constants, what is the value of ab ?
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi


Things to remember

To determine the number of solutions a system of linear equations has using slope-intercept form, y=mx+b:
  1. Rewrite both equations in slope-intercept form.
  2. Compare the m- and b-values of the equations to determine the number of solutions.
  3. If the two equations have different m-values, then the system has one solution.
  4. If the two equations have the same m-value but different b-values, then the system has no solution.
  5. If the two equations have both the same m-value and the same b-value, then the system has infinitely many solutions.

Want to join the conversation?