Easter Celebrations

eastercandy

Ms. Clementine was an old fashioned teacher

Ms. Clementine was an old fashioned teacher. She believed that the habit of working hard was the key to future success of the students.  She liked her students and wanted them to do well. May be that’s why as a task master she was harder than a drill sergeant. This semester, she was teaching the first algebra course to high school students. She had taught them how to solve simultaneous equations by elimination and by substitution. She wanted the students to decide which approach would work better for an individual problem.  You would think that giving this choice to the students reflected her leniency. No, she gave them home work for which students would have to work hard all night.

There was also another side to this teacher.  She loved religious holidays. Easter had been her favorite.  As a baby she used to  love the Easter egg hunt and all the candy she got to eat.  As she grew up she became a teacher but she organized these events with her church.  Perhaps, this is why all the homework she gave today was about Easter candy but retaining seriousness of math in it. There were several questions based on equations with two types of candies, some with three or four and even with five different Easter candies.

Sara and her boyfriend Johnny were both in Ms. Clementine’s class.  After school, they went to their homes but three hour later, Sara went to Johnny’s house.

Sara wanted to play Frisbee

Sara: Johnny, why don’t we go to the park and play some Frisbee ?  It is really pleasant outside. There is a nice breeze and not a cloud in site.

Johnny: Are you kidding ? We have so much homework from Ms. Clementine’s class.  I have been at it for two hours and done only 5 questions with 8 more to go.  The 5 questions I did were the easiest ones.  Looks like, I might have to pull an all nighter. How can you possibly think of playing ? Are you done with all the homework ?

Sara: Yes, I am done.

Johnny: I don’t believe you.  How did you do them so fast ?

Sara: Let’s go play Frisbee for half an hour. I will explain it to you when we come back.

Johnny:  Might as well go play.

They threw the Frisbee around and caught it.  No specific games.  That gave them just enough workout to break a sweat. After they came back from playing, Johnny was curious as to how Sara had finished the homework so fast.

Johnny:  So show me your tricks.

Sara: It is not my trick.  Last night, my dad told me an easy way by using Cramer’s rule.

Johnny: What on earth is that and why did  Ms. Clementine not teach us?

Sara: She is waiting until we take her grade 12 course in matrices, at least I intend to take it.

Matrices and Cramer’s rule

Johnny: What are matrices ?

Sara: I will give you the basics and then show you how to use  the Cramer’s rule.  I guess you will learn the rest from her in grade 12 if you take that course. Let us start with the first question you did today.  This is about caramel candies and kitkats.  It says that the cost of 7 caramel candies and 2 kitkats is $29 and that of two caramel candies and 5 kitkats is $26. I am just going to write x for caramel candies and y for kitkats, then:

7x + 2y = 29…..equation 1

2x + 5y = 26….. equation 2

Johnny: I already did all that.

Sara: But I can write the two equations in the form of a 2 x 2 matrix M in which the first column is for x, second for y, first equation is row 1, and the second equation is row 2.  Separately we will make a column for the right hand side.

slavedriver1a

Now, we will write another matrix (Mx) in which the x column of M is replaced by the right hand side column.  Similarly we will create the matrix My from M by replacing the y column with the right hand side column

slavedriver1b

Now we will calculate the determinants of the 2 x 2 matrices. The determinant of a 2 x 2 matrix is calculated as shown here

slavedriver1cHence the determinant D of the matrix (M) in our problem will be

7 x 5 – 2 x 2 =35-4 =31.

The determinant of Mx or Dx will be 29 x 5 – 26 x 2 = 145 -52 = 93,

and the determinant My or Dy = 7 x 26 – 2 x 29 = 182 – 58 =124

Now Cramer’s rule says x = Dx/D and y = Dy/D

Because D = 31, Dx = 93 and Dy is 124, x the caramel candy = 93/31 = $3 and y the kitkat = 124/31 = $4

Johnny: These must be huge candies to cost so much but that is the same answer I got. That was only a 2 variable problem.  Those, I can whiz by.  That does not help me.

Sara: As long as you get the idea.  We can slowly move onto the more difficult ones.  But before  I do this, let me show you how to calculate the determinants of larger matrices.

3 x 3 matrix – neat trick for the determinant

Here is a 3 x 3 matrix. You can get three 2 x 2 matrices out of it as shown here. Each of the 2 x 2 matrix is called a minor, and they are multiplied by a cofactor (term from the top row of the 3×3 matrix) as shown.  Then you can solve each 2×2 matrix like before and get the answer like it shows in the picture.

slavedriver3There is a trick you can use as shown in the alternative method.  You write the first two columns again at the end of the 3×3 matrix.  Then you can multiply the terms connected with the arrows.  Terms connected with the forward arrows (black) are added and those with the reverse arrows (red) are subtracted.  This trick works with the larger matrices too,  Here is an example of a 5×5 matrix.  If you are too lazy to do that, you can also get some calculators and worksheet programs to calculate the determinants for you.

Johnny:  Are you going to lecture on and on, or show me how to do a problem ?

Sara: Here is one more problem you have already done. Jamie’s family bought 6 caramilks, 2 kitkats and 2 Hershey candies for $16, Jonie bought only one each of caramilk and Hershey but 3 kitcats and paid $10 but Josephine bought 9 caramilks, 1 kitcat and 3 Hershey candies for $20.  What is the price for each type of one candy ?

Here I wrote caramilk as x, kitkat as 2 and Hershey as 3 and wrote the three equations.

slavedriver4

On the top left in the picture are the three equations with the variables x, y and z, and next they are in the matrix form. There is a 3×3 matrix (M) and then on the right is 1×3 matrix for the right hand sides of the equations. We can substitute the appropriate columns with the right hand side to get the matrices Mx, My and Mz (see the picture).  Then we can get their determinants.

I got D = 8,  Dx = 8, Dy = 16 and Dz= 24,

From Cramer’s rule x = Dx/D =1, y = Dy/D = 2 and z = Dz/D = 3.

So the caramilk was $1 each, kitkat $2 and Hershey $3.  These must all be different sizes to have such big price difference. What do you think ?

Johnny:  That’s it.  I can use the same procedure for all the rest of the questions.  If I get lazy, I might do some of the 4×4 or 5×5 determinants on the computer.  Now I should be able to finish my homework in 2 hours instead of all night.  Thanks Sara.  What about Ms. Clementine ?   She might ask us how we did them.

Sara:  Don’t worry.  I will deal with that.

Next day in class, the teacher asked if anyone had done all the homework. Only two students raised their hands – Sara and Johnny. Rest of the class had done only the questions with two variables or some with three variables.  They had stopped there.

Ms. Clementine: Sara, not that I don’t believe you.  Please, show me your notebook.

Sara gave her the notebook.

Ms. Clementine: I see you used matrices.  Clever girl.  Who taught you about them ?

Sara:  My dad told me but then I read about them myself,

Ms. Clementine: I guess you also taught Johnny and that’s how he finished the homework.  Well done.

On the way back from school, Sara told Johnny: My dad told me that there are lots of applications of matrices in physics, economics, graph theory, probability theory and everything. There are lot of things you can do to manipulate them.  Also, Cramer’s rule is not the only method to use them for solving simultaneous equations.

At this time, Johnny did not care.  He just wanted to enjoy the rest of the day.

What did you think of Ms. Clementine who gave so much homework but it was all about candy in the spirit of Easter celebrations ?

Challenge

For Easter five different families bought candy from the same store. Johnsons bought 2 peanut brittles, 3 Easter eggs, 4 kinder candy packs, 5 white chocolates and 1 big rabbit chocolate and paid $45.  Davidsons bought 6 peanut brittles, 2 Easter eggs, 3 kinder candy packs, 1 white chocolates and 5 big rabbit chocolates and paid $48. Chungs bought 1 peanut brittle, 5 Easter eggs, 2 kinder candy packs, 2 white chocolates and 2 big rabbit chocolates and paid $35. Tomlinsons bought 5 peanut brittles, 4 Easter eggs, 1 kinder candy pack, 3 white chocolates and 4 big rabbit chocolate and paid $48. Keeping up with the neighbours the Kichinawa family bought 3 peanut brittles, 1 Easter egg, 5 kinder candy packs, 4 white chocolates and 3 big rabbit chocolate and paid $51.

What is the price of one candy pack of each type ?

Answer:  Let us write a for peanut brittle, b for Easter egg, x for Kinder candy pac, y for white chocolate and z for the rabbit. Then the problem becomes the set of 5 equations written below.  To solve them, do the following:

slavedriver5

Step 1. Write a 5 x 5 matrix (M) for the left hand sides and a 1 x 5 matrix for the right hand sides of the equations.

Step 2. From the matrix M create matrices Ma, Mb, Mx, My and Mz by replacing the corresponding columns in matrix M with the right hand side matrix.

Step 3.  Compute their determinants D, Da, Db, Dx, Dy and Dz. Honestly, this step was much faster for me using Excel.

Step 4. Compute the values for a, b, x, y, z.

Step 5. Check your answer by using these values in at least one equation.