Suppose a jar contains red, blue and green marbles. You are told that there are a total of 30 marbles in the jar; there are twice as many red marbles as green ones; the number of blue marbles is the same as the sum of the red and green marbles. How many marbles of each colour are there?
We could attempt to solve this with some trial and error, and weβd probably get the correct answer without too much work. However, this wonβt lend itself towards learning a good technique for solving larger problems, so letβs be more mathematical about it.
Letβs let \(r\) represent the number of red marbles, and let \(b\) and \(g\) denote the number of blue and green marbles, respectively. We can use the given statements about the marbles in the jar to create some equations.
From this stage, there isnβt one βrightβ way of proceeding. Rather, there are many ways to use this information to find the solution. One way is to combine ideas from equations (3.1.2) and (3.1.3); in (3.1.3) replace \(r\) with \(2g\text{.}\) This gives us
\begin{equation}
b = 2g+g = 3g\text{.}\tag{3.1.4}
\end{equation}
We can then combine equations (3.1.1), (3.1.2) and (3.1.4) by replacing \(r\) in (3.1.1) with \(2g\) as we did before, and replacing \(b\) with \(3g\) to get
We can now use equation (3.1.8) to find \(r\) and \(b\text{;}\) we know from (3.1.2) that \(r = 2g = 10\) and then since \(r+b+g = 30\text{,}\) we easily find that \(b = 15\text{.}\)
Mathematicians often see solutions to given problems and then ask βWhat if\(\ldots\text{?}\)β Itβs an annoying habit that we would do well to develop β we should learn to think like a mathematician. What are the right kinds of βwhat ifβ questions to ask? Hereβs another annoying habit of mathematicians: they often ask βwrongβ questions. That is, they often ask questions and find that the answer isnβt particularly interesting. But asking enough questions often leads to some good βrightβ questions. So donβt be afraid of doing something βwrong;β we mathematicians do it all the time.
Letβs look at the first question. Would the solution to our problem change if we called the red balls \(q\text{?}\) Of course not. At the end, weβd find that \(q = 10\text{,}\) and we would know that this meant that we had 10 red balls.
Now letβs look at the second question. Suppose we had 60 balls, but the other relationships stayed the same. How would the situation and solution change? Letβs compare the βoriginalβ equations to the βnewβ equations.
By examining these equations, we see that nothing has changed except the first equation. It isnβt too much of a stretch of the imagination to see that we would solve this new problem exactly the same way that we solved the original one, except that weβd have twice as many of each type of ball.
A conclusion from answering these two questions is this: it doesnβt matter what we call our variables, and while changing constants in the equations changes the solution, they donβt really change the method of how we solve these equations.
In fact, it is a great discovery to realize that all we care about are the constants and the coefficients of the equations. By systematically handling these, we can solve any set of linear equations in a very nice way. Before we go on, we must first define what a linear equation is.
So in ExampleΒ 3.1.1, when we answered βhow many marbles of each colour are there?β we were also answering βfind a solution to a certain system of linear equations.β
Notice that the coefficients and constants can be fractions and irrational numbers (like \(\pi\text{,}\)\(\sqrt[3]{-10}\) and \(\cos(45^\circ)\)). The variables only come in the form of \(a_ix_i\text{;}\) that is, just one variable multiplied by a coefficient. (Note that \(\frac{3t}{5} = \frac35 t\text{,}\) just a variable multiplied by a coefficient.) Also, it doesnβt really matter what side of the equation we put the variables and the constants, although most of the time we write them with the variables on the left and the constants on the right.
We would not regard the above collection of equations to constitute a system of equations, since each equation uses differently named variables. An example of a system of linear equations is
It is important to notice that not all equations used all of the variables (it is more accurate to say that the coefficients can be 0, so the last equation could have been written as \(0x_1+x_2+x_3+0x_4 = 10\)). Also, just because we have four unknowns does not mean we have to have four equations. We could have had fewer, even just one, and we could have had more.
The first example is not a linear equation since the variables \(x\) and \(y\) are multiplied together. The second is not a linear equation because the variables are raised to powers other than 1; that is also a problem in the third equation (remember that \(1/x = x^{-1}\) and \(\sqrt{x} = x^{1/2}\)). Our variables cannot be the argument of function like \(\sin\text{,}\)\(\cos\) or \(\ln\text{,}\) nor can our variables be raised as an exponent.
At this stage, we have yet to discuss how to efficiently find a solution to a system of linear equations. That is a goal for the upcoming sections. Right now we focus on identifying linear equations. It is also useful to βlimberβ up by solving a few systems of equations using any method we have at hand to refresh our memory about the basic process.
A jar contains 100 marbles. We know there are twice as many green marbles as red; that the number of blue and yellow marbles together is the same as the number of green; and that three times the number of yellow marbles together with the red marbles gives the same numbers as the blue marbles. How many of each color of marble are in the jar?
A farmer looks out his window at his chickens and pigs. He tells his daughter that he sees 62 heads and 190 legs. How many chickens and pigs does the farmer have?
A lady buys 20 trinkets at a yard sale. The cost of each trinket is either $0.30 or $0.65. If she spends $8.80, how many of each type of trinket does she buy?