Systems of Linear Equations

A system of linear equations in two variables looks like this:

$$\eqalign{ a x + b y & = p \cr c x + d y & = q \cr}$$

Such a system may have no solutions, one solution (that is, a single pair $(x, y)$ ), or infinitely many solutions.

There are various ways to solve such a system. For example, you can solve the equation for one of the variables, then plug into the other equation. If one of the equations has one of the variables solved for, this is probably the best approach.

Example. Solve the system for x and y:

$$\eqalign{ 3 x + 5 y & = -1 \cr y & = 2 x + 1 \cr}$$

I notice that the second equation has y solved for in terms of x. So I'll plug $y = 2 x +
   1$ into $3 x + 5 y = -1$ and solve for x:

$$\eqalign{ 3 x + 5 y & = -1 \cr 3 x + 5(2 x + 1) & = -1 \cr 3 x + 10 x + 5 & = -1 \cr 13 x + 5 & = -1 \cr 13 x & = -6 \cr \noalign{\vskip2pt} x & = -\dfrac{6}{13} \cr}$$

To find y, plug $x =
   -\dfrac{6}{13}$ into $y = 2 x + 1$ :

$$y = 2 \left(-\dfrac{6}{13}\right) + 1 = -\dfrac{12}{13} + 1 = \dfrac{1}{13}.$$

The solution is $x
   = \dfrac{1}{13}$ and $y = -\dfrac{6}{13}$ .


If neither variable is solved for, you can add multiples of one equation to multiples of the other, or subtract multiples of one equation from multiples of the other. I will show how to do this in the examples. This approach often makes the computations easier.

If you're using this approach, make sure the equations look like this before you begin solving:

$$\eqalign{ a x + b y & = p \cr c x + d y & = q \cr}$$

That is, the x and y terms (or in general, the terms with the variables) should be on one side, and the number terms (the terms without variables) should be on the other. If the equations don't start out that way, move terms around to fix things.

Example. Solve the system for x and y:

$$\eqalign{ 3 x + 2 y & = 7 \cr 2 x + y & = 10 \cr}$$

The idea is to multiply one or both of the equations by numbers, so that the numbers on one of the variables match (different signs are okay). Then you add or subtract equations to cancel that variable.

To start, suppose I want to match the y-numbers. The first equation has $2 y$ and the second equation has y. I can get a match by multiplying the second equation by 2. Here's what I get:

$$\eqalign{ 3 x + 2 y & = 7 \cr 4 x + 2 y & = 20 \cr}$$

In other words, I did

$$2(2 x) + 2(y) = 2(10) \quad\hbox{to get}\quad 4 x + 2 y = 20.$$

Now that the y-numbers match, I can cancel the y-terms by subtracting the equations. Then it is easy to solve for x.

$$\matrix{ & 3 x & + & 2 y & = 7 \cr - & 4 x & + & 2 y & = 20 \cr \noalign{\vskip2pt \hrule \vskip2pt} & -x & & & = -13 \cr & x & & & = 13 \cr}$$

Now go back to the original equations:

$$\eqalign{ 3 x + 2 y & = 7 \cr 2 x + y & = 10 \cr}$$

I'll make the x-numbers match by multiplying the first equation by 2 and the second equation by 3:

$$\eqalign{ 6 x + 4 y & = 14 \cr 6 x + 3 y & = 30 \cr}$$

Now that the x-numbers match, I can cancel the x-terms by subtracting the equations. Then it is easy to solve for y.

$$\matrix{ & 6 x & + & 4 y & = 14 \cr - & 6 x & + & 3 y & = 30 \cr \noalign{\vskip2pt \hrule \vskip2pt} & & & y & = -16 \cr}$$

The solution is $x
   = 13$ and $y = -16$ .

Geometrically, the graphs of the equations $3 x + 2 y = 7$ and $2 x + y = 10$ are lines, and $(13, -16)$ is the point where the lines intersect:

$$\hbox{\epsfysize=2in \epsffile{systems-of-linear-equations1.eps}}\quad\halmos$$


Example. Solve the system for x and y:

$$\eqalign{ 3 x - 2 y & = 11 \cr 5 x + 4 y & = -2 \cr}$$

To get the x-numbers to match, I'll multiply the first equation by 5 and the second by 3:

$$\matrix{ & 15 x & - & 10 y & = & 55 \cr - & 15 x & + & 12 y & = & -6 \cr \noalign{\vskip2pt \hrule \vskip2pt} & & & -22 y & = & 61 \cr \noalign{\vskip2pt} & & & \dfrac{-22 y}{-22} & = & \dfrac{61}{-22} \cr \noalign{\vskip2pt} & & & y & = & -\dfrac{61}{22} \cr}$$

I subtracted the equations, because that causes the two "$15 x$ " terms to cancel.

Now go back to the original system:

$$\eqalign{ 3 x - 2 y & = 11 \cr 5 x + 4 y & = -2 \cr}$$

To get the y-numbers to match (without worrying about the sign), I can just multiply the first equation by 2:

$$\matrix{ & 6 x & - & 4 y & = & 22 \cr & 5 x & + & 4 y & = & -2 \cr}$$

To get the y-terms to cancel, I must add the equations, because I have "$-4 y$ " and "$4 y$ ".

$$\matrix{ & 6 x & - & 4 y & = & 22 \cr & 5 x & + & 4 y & = & -2 \cr \noalign{\vskip2pt \hrule \vskip2pt} & 11 x & & & = & 20 \cr \noalign{\vskip2pt} & \dfrac{11 x}{11} & & & = & \dfrac{20}{11} \cr \noalign{\vskip2pt} & x & & & = & \dfrac{20}{11} \cr}$$

The solution is $x
   = \dfrac{20}{11}$ and $y = -\dfrac{61}{22}$ .


Let me review what happened in the last example. If you have two terms with the same coefficient (number), then:

(a) If they have the same sign, you subtract equations to cancel them.

(b) If they have the opposite sign, you add equations to cancel them.

Example. Solve the system for x and y:

$$\eqalign{ x + y & = 1800 \cr 0.04 x + 0.03 y & = 67 \cr}$$

I'll get a match on the x-numbers by multiplying the first equation by 0.04. Then subtracting will cause the x-terms to cancel:

$$\matrix{ & 0.04 x & + & 0.04 y & = & 72 \cr - & 0.04 x & + & 0.03 y & = & 67 \cr \noalign{\vskip2pt \hrule \vskip2pt} & & & 0.01 y & = & 5 \cr \noalign{\vskip2pt} & & & \dfrac{0.01 y}{0.01} & = & \dfrac{5}{0.01} \cr \noalign{\vskip2pt} & & & y & = & 500 \cr}$$

I could go back to the original equations and get the y-numbers to match by multiplying the first equation by 0.03. But since I know $y = 500$ , and since $x + y = 1800$ , it's easier to plug in and solve for x:

$$x + 500 = 1800, \quad\hbox{so}\quad x = 1300.\quad\halmos$$


There are a couple of unusual cases that you should be aware of.

Example. ( A system with no solutions) Solve the system for x and y:

$$\eqalign{ 2 x - 5 y & = 3 \cr -4 x + 10 y & = 6 \cr}$$

Multiply the first equation by 2 to get 4 and -4 as the x-coefficients. Since they have opposite signs, I can cancel them by adding equations:

$$\matrix{ & 4 x & - & 10 y & = & 6 \cr + & -4 x & + & 10 y & = & 6 \cr \noalign{\vskip2pt \hrule \vskip2pt} & & & 0 & = & 12 \cr}$$

The last equation is a contradiction: 0 is obviously not equal to 12! Since I arrived at a contradiction, the system has no solutions.

Geometrically, the graphs of the equations $2 x - 5 y = 3$ and $-4 x + 10 y = 6$ are parallel lines. Since they are parallel, they don't intersect, and hence the system has no solutions.

$$\hbox{\epsfysize=2in \epsffile{systems-of-linear-equations2.eps}}\quad\halmos$$


Example. ( A system with infinitely many solutions) Solve the system for x and y:

$$\eqalign{ 3 x - 15 y & = 6 \cr 2 x - 10 y & = 4 \cr}$$

I'll get the x-numbers to match by multiplying the first equation by 2 and the second equation by 3. Then subtracting the equations will cause the x-terms to cancel:

$$\matrix{ & 6 x & - & 30 y & = & 12 \cr - & 6 x & - & 30 y & = & 12 \cr \noalign{\vskip2pt \hrule \vskip2pt} & & & 0 & = & 0 \cr}$$

An identity is an equation that is true for all values of its variables. The last equation is an identity (it has no variables). This means that the original system has infinitely many solutions.

Any point $(x, y)$ which satisfies either of the given equations will satisfy both. For example, if I pick some values of x at random, plug them into $3 x - 15 y = 6$ , and solve for y, I get solutions to the system:

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & \cr & x & & Plugged into $3 x - 15 y = 6$ gives \dots & & y & & Solution & \cr height2pt & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & \cr & 7 & & $21 - 15 y = 6$ & & 1 & & $(7, 1)$ & \cr height2pt & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & \cr & 0 & & $-15 y = 6$ & & $y = -\dfrac{2}{5}$ & & $\left(0, -\dfrac{2}{5}\right)$ & \cr height2pt & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & \cr & -13 & & $-39 - 15 y = 6$ & & -3 & & $(-13, -3)$ & \cr height2pt & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} $$

All of these solution points will also satisfy the second equation $2 x - 10 y = 4$ . I can get infinitely many solutions to the system this way.

How did this happen? Notice that when I multipled the first equation by 2 and the second equation by 3, I got the same equation. So the two equations I started with were really the same equation. Geometrically, their graphs are the same line, and the intersection of a line with itself is the line. A line contains infinitely many points, so the system has infinitely solutions.



Send comments about this page to: Bruce.Ikenaga@millersville.edu.

Bruce Ikenaga's Home Page

Copyright 2012 by Bruce Ikenaga