# Posts tagged ‘Determinants’

Back from a quick break and back to matrix math. As I showed with a 2×2 matrix we get the determinant of it by multiplying the first element of the first row by the last element of the last row; and subtracting this from the first element of the last row multiplied by the last element of the first row.

This if you will is our ‘atomic’ function that we’ll always use to find the determinant of a square matrix. Crucially when we deal with matrices larger than 2×2, we recursively break the matrix down into smaller matrices until we can pass our atomic function to each piece. Finally we use a similar approach as when we were finding the cross product using successive +, -, +.. etc. Lets get started. Given a 3×3 matrix:

1 5 3
2 4 7
4 6 2

First, we use the first row to break the matrix into 3 successive 2×2 matrices – lets create a 2×2 matrix using the first element:

1 5 3
2 4 7
4 6 2

It’s determinant -34 = (4*2) – (6*7). The second matrix for the second element of the first row:

1 5 3
2 4 7
4 6 2

It’s determinant -24 = (2*2) – (4*7). And finally the third matrix for last element of the first  row:

1 5 3
2 4 7
4 6 2

It’s determinant -4 = (2*6) – (4 * 4). Back to our initial row 1 5 3, we multiple each element by its determinant we found above to give us:

(1 * -34) = -34
(5 * -24) = -120
(3 * -4) = -12

Finally using our sign rule (+ – + – …) we add/subtract the parts: -34 – -120 + -12 giving us 74, the determinant of the 3×3 matrix.

Ok so we’ve cover matrix transpose and multiplication, we’re now going to get into determinants. I’ll spread this into multiple posts as we’ll be eventually dealing with recursive functions. Determinants are a crucial glue in matrix math which allow you to find the inverse, which is akin to the reciprocal.

With the a 2 x 2 matrix, the determinant is single function – once we deal 3 x 3 and greater sized matrices we essentially recursively break them down to 2 x 2 and pass the base function. For a 2 x 2 matrix:

A B
C D

All we need to do is multiply the first element of the first row by the last element of the last row (A*D), and first element of the last row by the last element of the first row (C * B). Then take these away from each other (AD) – (CD) to give us our determinant:

1 2
4 1

(1*1) = 1
(4*2) = 8
(1-8) = -7
= -7

We’ll dig into 3 x 3 matrices next and then onto recursive methods…
{"ft_lang_label":"__label__en","ft_lang_prob":0.83986205,"math_prob":0.9949691,"size":2467,"snap":"2020-45-2020-50","text_gpt3_token_len":728,"char_repetition_ratio":0.19488429,"word_repetition_ratio":0.13426854,"special_character_ratio":0.31901094,"punctuation_ratio":0.07434944,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9958505,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-28T10:05:09Z\",\"WARC-Record-ID\":\"<urn:uuid:c2024930-039a-4158-a900-d028d3ff344b>\",\"Content-Length\":\"45655\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:14f838ca-01bb-478a-90e3-dac77c18276c>\",\"WARC-Concurrent-To\":\"<urn:uuid:79e31a26-4281-4f57-bfb9-1c23ace59aaa>\",\"WARC-IP-Address\":\"192.0.78.12\",\"WARC-Target-URI\":\"https://charleslooker.wordpress.com/tag/determinants/\",\"WARC-Payload-Digest\":\"sha1:MZF4BYOFBYHTM6JXFGZZ3R6DPWHRQLAK\",\"WARC-Block-Digest\":\"sha1:G3P5VSTE7N5NXGDBWK72IE2BOLJO3WA2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141195417.37_warc_CC-MAIN-20201128095617-20201128125617-00715.warc.gz\"}"}