Visual Linear Algebra Online, Section 1.3
Jack and Jill earn a combined $79.50 when Jack works 2 hours and Jill works 3 hours. On the other hand, if Jack works 3 hours and Jill works 2 hours, they make $78.75 total. What are their individual hourly pay rates?
This is a typical kind of problem you might encounter in a situation where there are two unknowns. In this case, the unknowns are Jack’s and Jill’s individual pay rates. One approach to solving this problem is to just make guesses.
In both situations, the total number of hours worked is five. In addition, the total amount of money earned in both situations is close to $79. Since dollars per hour, we should expect both pay rates to be close to this amount.
Since the total amount earned is a bit more when Jill works more hours than Jack, we can say that Jill’s pay rate should be slightly higher than Jack’s pay rate. So, we might guess that Jack earns 15.50 $/hr and Jill earns 16.10 $/hr. This is probably not exactly right, but we can check how close it is as follows.
and
.
These are very close to the actual amounts $79.50 and $78.75 from above, so the correct answers for the pay rates would just take a bit more tweaking to find. However, we could easily end up guessing another five or six times before we come upon the exact right answers.
Use Algebra!
A better approach is to use algebra!
Represent their pay rates by letters which are “unknowns”. Suppose is Jack’s hourly pay rate, in dollars per hour, while is Jill’s hourly pay rate, in dollars per hour. If Jack works 2 hours, then his total pay is dollars. If Jill works 3 hours, then her total pay is dollars. Their total pay in this situation is , which must equal $79.50. Likewise, must equal $78.75. The resulting system of linear equations, shown without specifying the units, is below.
We use the curly bracket symbol { to emphasize that these two equations are a “system”. They “go together”.
A system of equations like this is called an open sentence. This means it is neither true nor false. The open sentence only becomes true or false upon substitution of particular pair of numbers.
A solution of this system is a pair of numbers that makes the open sentence true. In other words, when you plug both numbers into both equations, you get a true statement.
In the present example, the unique solution is the pair . You can check this by substitution:
and
.
Of course, this begs a question. How did we find the unique solution?
There are two main methods: substitution and elimination.
Substitution
In the method of substitution, we use algebra techniques in the following order.
- Solve one of the equations for one of the variables (it doesn’t matter which equation or which variable).
- Substitute the answer from step 1 into the other equation in place of the variable that was solved for. That other equation will now only involve one variable, so solve for it.
- Plug the answer from step 2 into any of the equations involving the two unknowns to solve for the other variable.
Substitution Details for Jack and Jill’s Pay Rates
Let us see how this works for the current system.
In step 1, we will solve the first equation for . Here are the algebra steps.
.
Now for step 2. In the second equation of the original system, substitute in place of to get . This can now be solved for . First, simplify to get and then . The final algebra steps are below.
.
This is the correct value for above, but we are not done. The unique solution must also involve the value of .
In step 3, we plug into the equation to get the value of the other unknown .
The unique final answer is the ordered pair . This is one answer, not two separate answers.
Technically-speaking, checking that this solves the original system does more than just confirm that we are right. It actually proves we are right. All the algebra that we have done just confirms that this ordered pair is the only possible solution. It does not prove it is an actual solution.
We will discuss this more when we look at extraneous solutions (to nonlinear equations) further below.
Elimination
The second method is called the method of elimination. For this method, we attempt to rewrite the original system in equivalent forms so that one of the variables is “eliminated” (deleted) from each equation.
Once again, logically-speaking, this will only serve to derive possible solutions. The proof that we have derived true solutions is in the checking.
Start by observing the nature of the original system.
If we multiply the top equation by 3 and the bottom equation by 2, there will be a term in both equations. Because of this, we could then subtract the second equation from the first to obtain another equation not involving that must hold true for a solution pair . Here are the details:
Subtracting the second equation from the first results in , or .
Of course, this last equation now can be quickly solved for and then substituted into either equation in the original system to reach the final answer. However, we prefer to be more systematic here for the benefit of generalizing the method to higher-dimensional problems that have more equations and more unknowns.
The New System
So instead, we say we now have a “new system” where the has been “eliminated” in the second equation. Note that we choose to rewrite the first equation back in its original form (this is not absolutely necessary, but it is slightly more convenient).
Now we notice that if we multiply the first equation by 5 and the second equation by 3, then we can subtract the second equation from the first to get a “new” first equation where we have “eliminated” .
Below you will find the details. In the final step we divide the first equation by 10 and the second equation by 5.
so
and
We are purposely formatting the resulting systems in an odd way (with the terms further to the left) because that will help us relate these ideas to “row operations” with matrices later in Chapter 1.
Visualizing Systems and Their Solutions in Rectangular Coordinates
The facts that 1) linear equations have graphs which are straight lines in rectangular coordinates and 2) solutions of linear equations are ordered pairs are big hints that it should be helpful to visualize solutions in the rectangular coordinate plane.
We consider a new example.
Instead of fully solving this system right away using either substitution or elimination, let us graph both linear equations in the plane first, using rectangular coordinates.
Recall that the graph, in rectangular coordinates, of an equation in two unknowns and is the set of all points in the plane whose rectangular coordinates satisfy the equation.
To make these graphs, solve each equation for as a function of first, as discussed in Section 1.1, “Points, Coordinates, and Graphs in Two Dimensions”.
For the first equation . For the second, .
Now you can either plot points or use the slopes and intercepts of these lines to make the following graphs.
Since any solution to the system must satisfy both equations, any solution must lie on both lines. But these lines have only one point in common (their intersection consists of one point). This point appears to have rectangular coordinates .
We can easily check (prove!) that this is a solution to the system: and .
But is it the only solution? And how could we have found it algebraically? Use our methods from above.
Substitution
We have already solved both equations for in terms of , so step 1 of the substitution method is complete. Actually, since we did this for both equations, step 2 can be modified. We can just set the resulting expressions equal to each other.
In this case, since the first equation of the system became and the second became , we can set and solve for .
Here are the steps.
.
From this we then get . If we want extra confirmation, note that as well.
This work proves that is the only possible solution to the linear system. Since we already knew it was a solution from the checking above, we can say that is the unique solution to the linear system.
Elimination
For the elimination method, we start by swapping the order of the equations. This is not absolutely necessary, but it is a standard “row operation” and make our next operations a little bit easier.
Now multiply the first equation by 5, leave the second equation unchanged (multiply it by 1), and then subtract the first equation from the second to obtain a “new” second equation. Also, even though we multiplied the first equation by 5 before the subtraction, keep the first equation unchanged in the system.
We note that this operation also could have been conceptualized as multiplying the first equation by and adding it to the second equation. In fact, this is a more common way of conceptualizing the operation.
Now divide the new second equation by (multiply it by ) to get a new second equation. After that, multiply that new second equation by and add it to the first equation to get a new first equation. Here is how to display these steps.
It is good to see that we got the same answer as before. When you are first learning these techniques, you might want to try both methods on at least a few problems as a way to double-check your answers.
Visualizing Elimination as a Transformation
There is an interesting way that the process of elimination can be visualized. In particular, we will visualize each “elimination step” as a “transformation”. Let us start with the step where is eliminated.
We can think of this step as a combination of smaller steps. Multiply the first equation by , then add the new first equation to the second equation to obtain a new second equation, then revert to keeping the first equation as it is.
Now, instead of multiplying the first equation by , let us imagine multiplying it by an unspecified quantity . Doing this gives a new first equation of which we will then add to the second equation to get a new second equation. Doing this, and reverting back to the original form of the first equation can be shown as follows.
Note that in the second equation will be eliminated if . Also note that in the second equation will be eliminated if (we won’t do this, but it is interesting to note that it can be done). Finally, note that the second equation is in its original form if .
When , the second equation represents a different line than the graph of . However, the solution (point of intersection) for the original system is the same. This is because we have algebra steps that are valid and therefore create an equivalent system.
Animation 1
We can visualize how the graph of changes as varies from 0 down to . It is quite interesting to watch. It seems that induces a rotation of the original line to a new horizontal line , which is equivalent to .
Animation 2
The step to eliminate from the first equation can be visualized in a similar way. Our “current” equivalent system is
Now multiply the second equation by an unspecified parameter to get , add the result to the first equation to get a new first equation, then leave the second equation as it was. This leads to the following system.
We can see from this that will be eliminated from the first equation when . So let us visualize the graphs of these equations as decreases from 0 down to .
As we saw above, the final answer is , because our original system was transformed to the equivalent system
Are These Rotations Occurring at a Constant Rate?
One nice thing about visuals like this is that they can spur us to ask and try to answer interesting questions.
For example, do the angles of rotation change at constant rates in these animations? It is a bit tough to tell in the second animation. In the first one, it seems that perhaps the angle is changing faster when the line is steep than when it is flat.
But, appearances can be deceiving. It would be best to do some calculations to confirm what is going on.
Dot Product and Angles
Recall from from Section 1.2, “Vectors in Two Dimensions” that the angle between two nonzero vectors and can be related to the dot product. This angle is . In this formula, is the dot product of and , while and are the lengths of and , respectively.
Choosing Vectors Parallel to the Lines
Consider the second animation above. One vector that is parallel to the horizontal red line is .
For any fixed , the equation of the blue line is . If we solve this for as a function of , we get . Thus, the line has slope .
We would like to find a vector that stays parallel to the blue line as changes. If we let be a vector whose first (horizontal) component is, for example, , then will be parallel to the blue line if we choose the second (vertical) component to be .
In other words, is parallel to the blue line for any fixed .
If we place the vectors and to have their initial points both at , we get the following animation as decreases from 0 down to .
Angle Calculation
The length of is constant: . The length of is a function of : .
In this last calculation, note that since .
Finally, the dot product of and is .
Therefore, as a function of , the angle between the two lines is .
This is certainly not a linear function of . The angle definitely does not change at a constant rate in the second animation.
The graph of this function is shown below. Note that the derivative is everywhere negative, because the angle increases as the parameter decreases. Also note that the slope is steeper when is near . In the animation, this means that the rotation starts slow and speeds up as decreases.
Classification of Two-Dimensional Linear Systems
What can we say about the general two-dimensional linear system?
Geometric Approach
Start by thinking geometrically (in rectangular coordinates). Assuming either or (or both), then the graph of will be a straight line in the plane. Likewise, assuming either or (or both), then the graph of will also be a straight line in the plane.
Typically (“generically”), these two lines will have two different slopes. In that case, they will intersect at just one point, which will evidently be the unique solution of the linear system.
If the lines happen to have the same slope, then they will be parallel. If these two parallel lines are distinct, the lines will not intersect and the linear system will have no solution.
On the other hand, if these two parallel lines are actually the same parallel line, there will evidently be infinitely many solutions to the linear system (all the points on this common line).
Systems which have a solution are called consistent. Systems which do not have a solution are called inconsistent.
Algebraic Approach
How would this play out if we attempted to do row operations in the general case?
Unique Solutions
To keep things simple, assume that . To eliminate the term from the second equation, multiply the first equation by (with ). Then add this to the second equation, obtaining a new second equation (and reverting back to the original first equation). Below is the schematic representation of this operation, along with a second operation which is a multiplication of the second equation by .
It is of utmost importance to note that the second operation above can only be performed if we also assume that . This is actually the condition that guarantees that the two original lines are not parallel, so there will be a unique solution.
The quantity is so important that it has a name. It is called the determinant of the linear system (more precisely, it is the determinant of the so-called coefficient matrix of the linear system).
Back-substitution of in place of in the first equation of the system can now allow you to solve for (assuming ). The simplified answer is .
Therefore, when and , the unique solution of the linear system is the ordered pair .
It is an exercise to show that the same answer can be obtained when as long as .
Infinitely Many Solutions or No Solutions
On the other hand, if the determinant , the original system will either have no solutions or infinitely many solutions.
It is an exercise to show that there are infinitely many solutions if the equations and are constant (nonzero) multiples of each other. In other words, when there is a nonzero constant so that , , and . Note that it is possible that either or that in this situation.
It is also an exercise to show that there are no solutions when if there is a nonzero constant such that and , but .
Parametric Vector Form of Solutions in the Infinite Case
Consider the case where , , and for . In this case, the equations in the system are nonzero multiples of each other and there are infinitely many solutions.
Doing row operations in this situation will result in a second equation that is converted to . This means the second equation can be “discarded” or “ignored” and we can just focus on the first equation .
In the case where , we can solve this for as a function of to get (and in the case where but , we can solve for as a function of ).
In this setting, it is customary to call a “free variable” and to write the infinitely many solutions in “parametric vector form” as shown below.
In doing this, we are: 1) viewing the solutions as vectors rather than as points (using the natural association between points and vectors discussed in Section 1.2, “Vectors in Two Dimensions”) and 2) treating the vectors and as “constant parts” of the solution, while allowing the real number to be the “variable part” (i.e., the “parameter”).
Because there is one (linear) parameter, the solution set can be at most one-dimensional. In fact, it is exactly one-dimensional and is, of course, a straight line.
Viewing Solutions in Terms of the Geometry of Vector Operations
If we place the initial point of at the origin and the initial point of at the tip of , then we can use the geometric interpretation of scalar multiplication and vector addition to view the infinitely many solution points in terms of these vectors.
For example, suppose the system is the following.
These equations are constant multiples of each other and row operations will produce a second equation that can be discarded. The solution set is the line represented by , which is equivalent to . In parametric vector form, the solution set is represented in the following way.
And here is a way to visualize the solution set that takes advantage of our understanding of the geometry of vector addition and scalar multiplication. As a set of points, the solution set is the green line. As a set of vectors, the solution set consists of all the magenta-colored (pink) vectors.
Important Observations
Note that is one particular solution to the original system.
On the other hand, the vector does not solve the original system. Instead, it solves the so-called corresponding homogeneous system, where the constants on the right-hand sides are both zero.
This is an observation that will generalize to higher dimensions. Make sure you remember it for the future.
Relationship to Coordinate Changes
Consider once again the general linear system, written in a slightly different way.
As discussed in Section 1.1, “Points, Coordinates, and Graphs in Two Dimensions”, it will be helpful in future sections to think of these equations as defining a “linear transformation”. This linear transformation will essentially take a system of rectangular coordinates and convert it to a system of new coordinates for points in the plane. Most likely (generically), these new coordinates will be with respect to a system of slanted axes.
Assuming that the determinant , this linear transformation will have an inverse. Finding this inverse involves doing the exact same algebra as in the previous section where we found the unique solution .
As a system of equations, the inverse transformation can be written as follows.
Extraneous Solutions of Nonlinear Equations
Finally, we re-emphasize the logical importance of checking solutions. Logically-speaking, the substitution or elimination steps to solve a system only derive possible solutions. The proof that we have found actual solutions is in the checking.
This point is brought home by considering certain nonlinear equations.
For example, consider the nonlinear equation . To solve for , a standard first step is to square both sides to get rid of the radical. Doing so gives , which becomes and then . This quadratic can be factored to get and get possible solutions of and .
However, if you check these in the original equation, only works. The number is not a solution of the original equation, since (by definition, the symbol only represents the positive square root of 4). We therefore call an extraneous solution of the original equation (a better term is probably “fictitious solution”).
The root of the problem here (pun intended) is that we squared both sides of the original equation . Such a transformation is not invertible because it is not one-to-one.
Exercises
- Bobby and Cindy earn a combined $134.70 when Bobby works 3 hours and Cindy works 4 hours. On the other hand, if Bobby works 4 hours and Cindy works 3 hours, they make $134.10 total. What are their individual hourly pay rates?
- (a) Use both substitution and elimination to find the unique solution of the following system. Show your work. (b) Draw graphs in the plane (in rectangular coordinates) to represent this situation.
3. (a) Represent the solutions of the following system in parametric vector form with as a free variable (rather than ). (b) Draw a picture of the line along with the vectors , , and when .
4. Verify that the solution of the general system below is even in the case where as long as . Note that, in this case this also means you can assume .
5. Show work to find the inverse transformation of the one defined by the following system. Assume you are never dividing by zero as you work through your steps.
Video for Section 1.3
Here is a video overview of the content of this section.