Monday, October 19, 2015

Episode 070: The Determinant.





Download this episode (right click and save)







This week, I decided to go back to a topic that was in-progress and sort of went on hold: vector operations. On the heels of the dot product, we're at the point where it's time to tackle the big one: the cross product. But first, there is a small bit of back story that is worth telling in order for the cross product to make sense: The Determinant.

So without going into too much painful detail, there is a wonderful subsection of mathematics called Elementary Linear Algebra, which is pretty much entirely dedicated to matrix operations. Fascinating course. So a matrix, since we haven't already covered it in any detail here on the blog/podcast you can think of as a square or rectangular array of numbers. Below is an example of a 2x2 matrix (pronounced 2 by 2):

You can put anything in these slots 1,2,3,4. Numbers, variables, trig functions, anything mathematical that you can think of. However, our focus right now is how to calculate the determinant. You can do this by multiplying the items in slots 1 and 4, and subtracting the product of slots 3 and 2.

Now, you can in the same way visualize a 3x3 matrix by thinking of each entry as one of the numbers on your phone.

In slots 1,2, &3, we will be putting our i-hat, j-hat, and k-hat unit vectors. To perform the first determinant, which will be for the i-hat vector, we will think of our lowest right-hand corner 2x2 block to be a 2x2 matrix, for which we will be calculating the determinant:

When you calculate the i-hat component of your determinant, we will draw one line horizontal, and one line vertically which will "cancel" out or show us which values we will not be using to calculate our determinant. This leaves (5*9-8*7)i-hat.

For the k-hat component, we perform roughly the same operation. The two pink lines show which components of the matrix we will not be using, and we calculate the determinant of the 2x2 matrix which remains: (4*8-7*5)k-hat.

Wait! You forgot about j-hat! What gives?? i-hat and k-hat are very similar in that they give "nice" 2x2 matrices to calculate determinants of. When we draw our pink lines again for this example:

We have a small problem. We have to cross over the pink lines! There is not an easy 2x2 matrix to calculate the determinant of! Well, if you were to move reproduce the i-hat column to the right of the k-hat column, there would be a nice 2x2 matrix to calculate. However, so as not to move the matrix around, there is a rule: when you cross the pink line for j-hat, you need to multiply the whole thing by -1: this gives -(4*9-7*6)j-hat, or (7*6-4*9) j-hat.

Altogether, we now have: (5*9-8*7)i-hat+(7*6-4*9)j-hat+(4*8-7*5)k-hat. Written as a vector where i-hat, j-hat and k-hat correspond to x,y,z coordinates we have [(5*9-8*7),(7*6-4*9),(4*8-7*5)]. Bear in mind, that these are not the numbers 1,2,3,4,5,6,7,8 & 9. They correspond to whatever variables, constants, or trig functions that rest in these spaces. More on this later. This whole operation may be marginally clumsy and a little confusing for newcomers, but stay tuned for the cross product step-by-step. The steps will be very similar, and this step in the journey will make the cross product more familiar, and seriously clarify its origins.