#set document(title: "9.6 Determinant", author: "Jiří Lebl") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 9.6#h(0.6em)Determinant For square matrices we define a useful quantity called the #emph[determinant]. Define the determinant of a #math.equation(block: false, alt: "1 times 1")[$1 × 1$] matrix as the value of its only entry #math.equation(block: true, alt: "det open parenthesis [ a ] close parenthesis equals def a .")[$det ( [ a ] ) limits(=)^("def") a .$] For a #math.equation(block: false, alt: "2 times 2")[$2 × 2$] matrix, define #math.equation(block: true, alt: "det open parenthesis [ a, b; c, d ] close parenthesis equals def a d minus b c .")[$det ( [ a & b \ c & d ] ) limits(=)^("def") a d − b c .$] Before defining the determinant for larger matrices, we note the meaning of the determinant. An #math.equation(block: false, alt: "n times n")[$n × n$] matrix gives a mapping of the #math.equation(block: false, alt: "n")[$n$]-dimensional euclidean space #math.equation(block: false, alt: "ℝ to the power n")[$ℝ^(n)$] to itself. So a #math.equation(block: false, alt: "2 times 2")[$2 × 2$] matrix #math.equation(block: false, alt: "A")[$A$] is a mapping of the plane to itself. The determinant of #math.equation(block: false, alt: "A")[$A$] is the factor by which the area of objects changes. If we take the unit square (square of side 1) in the plane, then #math.equation(block: false, alt: "A")[$A$] takes the square to a parallelogram of area #math.equation(block: false, alt: "| det open parenthesis A close parenthesis |")[$| det ( A ) |$]. The sign of #math.equation(block: false, alt: "det open parenthesis A close parenthesis")[$det ( A )$] denotes a change of orientation (negative if the axes get flipped). For example, let #math.equation(block: true, alt: "A equals [ 1, 1; minus 1, 1 ] .")[$A = [ 1 & 1 \ − 1 & 1 ] .$] Then #math.equation(block: false, alt: "det open parenthesis A close parenthesis equals 1 plus 1 equals 2")[$det ( A ) = 1 + 1 = 2$]. Let us see where #math.equation(block: false, alt: "A")[$A$] sends the unit square—the square with vertices #math.equation(block: false, alt: "open parenthesis 0 , 0 close parenthesis")[$( 0 , 0 )$], #math.equation(block: false, alt: "open parenthesis 1 , 0 close parenthesis")[$( 1 , 0 )$], #math.equation(block: false, alt: "open parenthesis 0 , 1 close parenthesis")[$( 0 , 1 )$], and #math.equation(block: false, alt: "open parenthesis 1 , 1 close parenthesis")[$( 1 , 1 )$]. The point #math.equation(block: false, alt: "open parenthesis 0 , 0 close parenthesis")[$( 0 , 0 )$] gets sent to #math.equation(block: false, alt: "open parenthesis 0 , 0 close parenthesis")[$( 0 , 0 )$]. #math.equation(block: true, alt: "[ 1, 1; minus 1, 1 ] [ 1; 0 ] equals [ 1; minus 1 ] , [ 1, 1; minus 1, 1 ] [ 0; 1 ] equals [ 1; 1 ] , [ 1, 1; minus 1, 1 ] [ 1; 1 ] equals [ 2; 0 ] .")[$[ 1 & 1 \ − 1 & 1 ] [ 1 \ 0 ] = [ 1 \ − 1 ] , #h(2em) [ 1 & 1 \ − 1 & 1 ] [ 0 \ 1 ] = [ 1 \ 1 ] , #h(2em) [ 1 & 1 \ − 1 & 1 ] [ 1 \ 1 ] = [ 2 \ 0 ] .$] The image of the square is another square with vertices #math.equation(block: false, alt: "open parenthesis 0 , 0 close parenthesis")[$( 0 , 0 )$], #math.equation(block: false, alt: "open parenthesis 1 , minus 1 close parenthesis")[$( 1 , − 1 )$], #math.equation(block: false, alt: "open parenthesis 1 , 1 close parenthesis")[$( 1 , 1 )$], and #math.equation(block: false, alt: "open parenthesis 2 , 0 close parenthesis")[$( 2 , 0 )$]. The image square has a side of length #math.equation(block: false, alt: "the square root of 2")[$sqrt(2)$], and it is therefore of area #math.equation(block: false, alt: "2")[$2$]. See Figure #math.equation(block: false, alt: "1")[$1$]. A = \[1 1; −1 d\] applied to the unit square (dashed blue) — at the default d = 1 this is the section's own example, det A = 2, and the image parallelogram (orange) has area |det A| = |d + 1|. Drag d down through −1 to collapse the parallelogram onto a single segment (area 0, the two columns identical, so A is not invertible), then keep going to see the orientation flip that the sign of det A records. {"functions":\[{"color":"\#1f4e79","domain":null,"expression":"t","expression2":"0","id":"sq-b","inequality":"lt","lineDash":\[4,4\],"lineWidth":1.5,"mode":"parametric","tMax":1,"tMin":0,"variable":"t","visible":true},{"color":"\#1f4e79","domain":null,"expression":"1","expression2":"t","id":"sq-r","inequality":"lt","lineDash":\[4,4\],"lineWidth":1.5,"mode":"parametric","tMax":1,"tMin":0,"variable":"t","visible":true},{"color":"\#1f4e79","domain":null,"expression":"1-t","expression2":"1","id":"sq-t","inequality":"lt","lineDash":\[4,4\],"lineWidth":1.5,"mode":"parametric","tMax":1,"tMin":0,"variable":"t","visible":true},{"color":"\#1f4e79","domain":null,"expression":"0","expression2":"1-t","id":"sq-l","inequality":"lt","lineDash":\[4,4\],"lineWidth":1.5,"mode":"parametric","tMax":1,"tMin":0,"variable":"t","visible":true},{"color":"\#b8442a","domain":null,"expression":"t","expression2":"-t","id":"img-e1","inequality":"lt","lineDash":\[\],"lineWidth":2.5,"mode":"parametric","tMax":1,"tMin":0,"variable":"t","visible":true},{"color":"\#b8442a","domain":null,"expression":"1+t","expression2":"-1+d\*t","id":"img-e2","inequality":"lt","lineDash":\[\],"lineWidth":2.5,"mode":"parametric","tMax":1,"tMin":0,"variable":"t","visible":true},{"color":"\#b8442a","domain":null,"expression":"2-t","expression2":"(d-1)+t","id":"img-e3","inequality":"lt","lineDash":\[\],"lineWidth":2.5,"mode":"parametric","tMax":1,"tMin":0,"variable":"t","visible":true},{"color":"\#b8442a","domain":null,"expression":"1-t","expression2":"d-d\*t","id":"img-e4","inequality":"lt","lineDash":\[\],"lineWidth":2.5,"mode":"parametric","tMax":1,"tMin":0,"variable":"t","visible":true}\],"grid":{"axisColor":"\#333333","gridColor":"\#cccccc","majorSpacing":1,"minorGridColor":"\#eeeeee","showAxes":true,"showLabels":true},"parameters":\[{"id":"p-d","label":"Lower-right entry d","max":2,"min":-2,"name":"d","step":0.05,"unit":"","value":1}\],"title":"Image of the unit square: area = |det A|","version":1,"viewport":{"centerX":1,"centerY":-0.5,"scale":80}} #figure(figph[Image, which is rotated and enlarged, of the unit square via the mapping A], alt: "Image, which is rotated and enlarged, of the unit square via the mapping A", caption: [Figure #math.equation(block: false, alt: "1")[$1$]: Image of the unit square via the mapping #math.equation(block: false, alt: "A")[$A$].]) In general, the image of a square is going to be a parallelogram. In high school geometry, you may have seen a formula for computing the area of a with vertices #math.equation(block: false, alt: "open parenthesis 0 , 0 close parenthesis")[$( 0 , 0 )$], #math.equation(block: false, alt: "open parenthesis a , c close parenthesis")[$( a , c )$], #math.equation(block: false, alt: "open parenthesis b , d close parenthesis")[$( b , d )$] and #math.equation(block: false, alt: "open parenthesis a plus b , c plus d close parenthesis")[$( a + b , c + d )$]. The area is #math.equation(block: true, alt: "| det open parenthesis [ a, b; c, d ] close parenthesis | equals | a d minus b c | .")[$| det ( [ a & b \ c & d ] ) | = | a d − b c | .$] The vertical lines above mean absolute value. The matrix #math.equation(block: false, alt: "[ a, b; c, d ]")[$[ a & b \ c & d ]$] carries the unit square to the given parallelogram. The parallelepiped spanned by the columns u = (1, 0, 0), v = (a, 1, 0), w = (0.4, 0.3, 1.2). Drag the shear slider a: the solid leans, but its volume - the determinant, here 1.2 - never changes, because adding a multiple of one column to another leaves the determinant alone. The 3D sibling of the unit-square figure above. {"camera":{"fov":50,"position":\[3.6,3.0,2.6\],"projection":"perspective","target":\[0.85,0.7,0.6\]},"id":"lebl-det-parallelepiped","metadata":{"alt\_text":"A translucent 3D parallelepiped spanned by the three column vectors (1,0,0), (a,1,0) and (0.4,0.3,1.2), drawn as six faces. Dragging the shear slider a from -1.5 to 1.5 makes the solid lean sideways like a stack of cards, but its volume stays exactly 1.2 - the absolute value of the determinant, unchanged by adding a multiple of one column to another."},"objects":\[{"id":"lebl-det-parallelepiped-p-a","kind":"parameter","label":{"text":"shear a (second column)","visible":true},"max":1.5,"min":-1.5,"name":"a","step":0.1,"value":0.6,"visible":true},{"id":"lebl-det-parallelepiped-bottom","kind":"parametric-surface","label":{"text":"bottom","visible":false},"resolution":4,"style":{"colormap":"plasma","doubleSided":true,"opacity":0.62,"wireframe":false,"wireframeColor":"\#000000"},"uDomain":\[0,1\],"vDomain":\[0,1\],"visible":true,"xExpr":"u + a\*v","yExpr":"v","zExpr":"0"},{"id":"lebl-det-parallelepiped-top","kind":"parametric-surface","label":{"text":"top","visible":false},"resolution":4,"style":{"colormap":"plasma","doubleSided":true,"opacity":0.62,"wireframe":false,"wireframeColor":"\#000000"},"uDomain":\[0,1\],"vDomain":\[0,1\],"visible":true,"xExpr":"u + a\*v + 0.4","yExpr":"v + 0.3","zExpr":"1.2"},{"id":"lebl-det-parallelepiped-front","kind":"parametric-surface","label":{"text":"front","visible":false},"resolution":4,"style":{"colormap":"plasma","doubleSided":true,"opacity":0.62,"wireframe":false,"wireframeColor":"\#000000"},"uDomain":\[0,1\],"vDomain":\[0,1\],"visible":true,"xExpr":"u + 0.4\*v","yExpr":"0.3\*v","zExpr":"1.2\*v"},{"id":"lebl-det-parallelepiped-back","kind":"parametric-surface","label":{"text":"back","visible":false},"resolution":4,"style":{"colormap":"plasma","doubleSided":true,"opacity":0.62,"wireframe":false,"wireframeColor":"\#000000"},"uDomain":\[0,1\],"vDomain":\[0,1\],"visible":true,"xExpr":"u + a + 0.4\*v","yExpr":"1 + 0.3\*v","zExpr":"1.2\*v"},{"id":"lebl-det-parallelepiped-left","kind":"parametric-surface","label":{"text":"left","visible":false},"resolution":4,"style":{"colormap":"plasma","doubleSided":true,"opacity":0.62,"wireframe":false,"wireframeColor":"\#000000"},"uDomain":\[0,1\],"vDomain":\[0,1\],"visible":true,"xExpr":"a\*u + 0.4\*v","yExpr":"u + 0.3\*v","zExpr":"1.2\*v"},{"id":"lebl-det-parallelepiped-right","kind":"parametric-surface","label":{"text":"right","visible":false},"resolution":4,"style":{"colormap":"plasma","doubleSided":true,"opacity":0.62,"wireframe":false,"wireframeColor":"\#000000"},"uDomain":\[0,1\],"vDomain":\[0,1\],"visible":true,"xExpr":"1 + a\*u + 0.4\*v","yExpr":"u + 0.3\*v","zExpr":"1.2\*v"}\],"title":"Parallelepiped of (1,0,0), (a,1,0), (0.4,0.3,1.2) - volume = det = 1.2","version":1} There are a number of ways to define the determinant for an #math.equation(block: false, alt: "n times n")[$n × n$] matrix. Let us use the so-called #emph[cofactor expansion]. We define #math.equation(block: false, alt: "A sub i j")[$A_(i j)$] as the matrix #math.equation(block: false, alt: "A")[$A$] with the #math.equation(block: false, alt: "i to the power th")[$i^("th")$] row and the #math.equation(block: false, alt: "j to the power th")[$j^("th")$] column deleted. For example, if #math.equation(block: true, alt: "If A equals [ 1, 2, 3; 4, 5, 6; 7, 8, 9 ] , then A sub 12 equals [ 4, 6; 7, 9 ] and A sub 23 equals [ 1, 2; 7, 8 ] .")[$"If" #h(2em) A = [ 1 & 2 & 3 \ 4 & 5 & 6 \ 7 & 8 & 9 ] , #h(2em) "then" #h(2em) A_(12) = [ 4 & 6 \ 7 & 9 ] #h(2em) "and" #h(2em) A_(23) = [ 1 & 2 \ 7 & 8 ] .$] We now define the determinant recursively #math.equation(block: true, alt: "det open parenthesis A close parenthesis equals def ∑ j equals 1 n open parenthesis minus 1 close parenthesis to the power 1 plus j a sub 1 j det open parenthesis A sub 1 j close parenthesis ,")[$det ( A ) limits(=)^("def") ∑_(j = 1)^(n) attach(( − 1 ), t: 1 + j) a_(1 j) det ( A_(1 j) ) ,$] or in other words #math.equation(block: true, alt: "plus a sub 1 n det open parenthesis A sub 1 n close parenthesis if n is odd,; minus a sub 1 n det open parenthesis A sub 1 n close parenthesis if n even.")[$+ a_(1 n) det ( A_(1 n) ) "if " n " is odd," \ − a_(1 n) det ( A_(1 n) ) "if " n " even."$] For a #math.equation(block: false, alt: "3 times 3")[$3 × 3$] matrix, we get #math.equation(block: false, alt: "det open parenthesis A close parenthesis equals a sub 11 det open parenthesis A sub 11 close parenthesis minus a sub 12 det open parenthesis A sub 12 close parenthesis plus a sub 13 det open parenthesis A sub 13 close parenthesis")[$det ( A ) = a_(11) det ( A_(11) ) − a_(12) det ( A_(12) ) + a_(13) det ( A_(13) )$]. For example, #math.equation(block: true, alt: "det open parenthesis [ 1, 2, 3; 4, 5, 6; 7, 8, 9 ] close parenthesis equals 1 times det open parenthesis [ 5, 6; 8, 9 ] close parenthesis minus 2 times det open parenthesis [ 4, 6; 7, 9 ] close parenthesis plus 3 times det open parenthesis [ 4, 5; 7, 8 ] close parenthesis; equals 1 open parenthesis 5 times 9 minus 6 times 8 close parenthesis minus 2 open parenthesis 4 times 9 minus 6 times 7 close parenthesis plus 3 open parenthesis 4 times 8 minus 5 times 7 close parenthesis equals 0 .")[$det ( [ 1 & 2 & 3 \ 4 & 5 & 6 \ 7 & 8 & 9 ] ) = 1 · det ( [ 5 & 6 \ 8 & 9 ] ) − 2 · det ( [ 4 & 6 \ 7 & 9 ] ) + 3 · det ( [ 4 & 5 \ 7 & 8 ] ) \ = 1 ( 5 · 9 − 6 · 8 ) − 2 ( 4 · 9 − 6 · 7 ) + 3 ( 4 · 8 − 5 · 7 ) = 0 .$] It turns out that we did not have to necessarily use the first row. That is for any #math.equation(block: false, alt: "i")[$i$], #math.equation(block: true, alt: "det open parenthesis A close parenthesis equals ∑ j equals 1 n open parenthesis minus 1 close parenthesis to the power i plus j a sub i j det open parenthesis A sub i j close parenthesis .")[$det ( A ) = ∑_(j = 1)^(n) attach(( − 1 ), t: i + j) a_(i j) det ( A_(i j) ) .$] It is sometimes useful to use a row other than the first. In the following example it is more convenient to expand along the second row. Notice that for the second row we are starting with a negative sign. #math.equation(block: true, alt: "det open parenthesis [ 1, 2, 3; 0, 5, 0; 7, 8, 9 ] close parenthesis equals minus 0 times det open parenthesis [ 2, 3; 8, 9 ] close parenthesis plus 5 times det open parenthesis [ 1, 3; 7, 9 ] close parenthesis minus 0 times det open parenthesis [ 1, 2; 7, 8 ] close parenthesis; equals 0 plus 5 open parenthesis 1 times 9 minus 3 times 7 close parenthesis plus 0 equals minus 60 .")[$det ( [ 1 & 2 & 3 \ 0 & 5 & 0 \ 7 & 8 & 9 ] ) = − 0 · det ( [ 2 & 3 \ 8 & 9 ] ) + 5 · det ( [ 1 & 3 \ 7 & 9 ] ) − 0 · det ( [ 1 & 2 \ 7 & 8 ] ) \ = 0 + 5 ( 1 · 9 − 3 · 7 ) + 0 = − 60 .$] Let us check if it is really the same as expanding along the first row, #math.equation(block: true, alt: "det open parenthesis [ 1, 2, 3; 0, 5, 0; 7, 8, 9 ] close parenthesis equals 1 times det open parenthesis [ 5, 0; 8, 9 ] close parenthesis minus 2 times det open parenthesis [ 0, 0; 7, 9 ] close parenthesis plus 3 times det open parenthesis [ 0, 5; 7, 8 ] close parenthesis; equals 1 open parenthesis 5 times 9 minus 0 times 8 close parenthesis minus 2 open parenthesis 0 times 9 minus 0 times 7 close parenthesis plus 3 open parenthesis 0 times 8 minus 5 times 7 close parenthesis equals minus 60 .")[$det ( [ 1 & 2 & 3 \ 0 & 5 & 0 \ 7 & 8 & 9 ] ) = 1 · det ( [ 5 & 0 \ 8 & 9 ] ) − 2 · det ( [ 0 & 0 \ 7 & 9 ] ) + 3 · det ( [ 0 & 5 \ 7 & 8 ] ) \ = 1 ( 5 · 9 − 0 · 8 ) − 2 ( 0 · 9 − 0 · 7 ) + 3 ( 0 · 8 − 5 · 7 ) = − 60 .$] In computing the determinant, we alternately add and subtract the determinants of the submatrices #math.equation(block: false, alt: "A sub i j")[$A_(i j)$] multiplied by #math.equation(block: false, alt: "a sub i j")[$a_(i j)$] for a fixed #math.equation(block: false, alt: "i")[$i$] and all #math.equation(block: false, alt: "j")[$j$]. The numbers #math.equation(block: false, alt: "open parenthesis minus 1 close parenthesis to the power i plus j det open parenthesis A sub i j close parenthesis")[$attach(( − 1 ), t: i + j) det ( A_(i j) )$] are called #emph[cofactors] of the matrix. And that is why this method of computing the determinant is called the #emph[cofactor expansion]. Similarly we do not need to expand along a row, we can expand along a column. For any #math.equation(block: false, alt: "j")[$j$], #math.equation(block: true, alt: "det open parenthesis A close parenthesis equals ∑ i equals 1 n open parenthesis minus 1 close parenthesis to the power i plus j a sub i j det open parenthesis A sub i j close parenthesis .")[$det ( A ) = ∑_(i = 1)^(n) attach(( − 1 ), t: i + j) a_(i j) det ( A_(i j) ) .$] A related fact is that #math.equation(block: true, alt: "det open parenthesis A close parenthesis equals det open parenthesis A to the power T close parenthesis .")[$det ( A ) = det ( A^(T) ) .$] A matrix is #emph[upper triangular] if all elements below the main diagonal are #math.equation(block: false, alt: "0")[$0$]. For example, #math.equation(block: true, alt: "[ 1, 2, 3; 0, 5, 6; 0, 0, 9 ]")[$[ 1 & 2 & 3 \ 0 & 5 & 6 \ 0 & 0 & 9 ]$] is upper triangular. Similarly a #emph[lower triangular] matrix is one where everything above the diagonal is zero. For example, #math.equation(block: true, alt: "[ 1, 0, 0; 4, 5, 0; 7, 8, 9 ] .")[$[ 1 & 0 & 0 \ 4 & 5 & 0 \ 7 & 8 & 9 ] .$] The determinant for triangular matrices is very simple to compute. Consider the lower triangular matrix. If we expand along the first row, we find that the determinant is 1 times the determinant of the lower triangular matrix #math.equation(block: false, alt: "[ 5, 0; 8, 9 ]")[$[ 5 & 0 \ 8 & 9 ]$]. So the deteriminant is just the product of the diagonal entries: #math.equation(block: true, alt: "det open parenthesis [ 1, 0, 0; 4, 5, 0; 7, 8, 9 ] close parenthesis equals 1 times 5 times 9 equals 45 .")[$det ( [ 1 & 0 & 0 \ 4 & 5 & 0 \ 7 & 8 & 9 ] ) = 1 · 5 · 9 = 45 .$] Similarly for upper triangular matrices #math.equation(block: true, alt: "det open parenthesis [ 1, 2, 3; 0, 5, 6; 0, 0, 9 ] close parenthesis equals 1 times 5 times 9 equals 45 .")[$det ( [ 1 & 2 & 3 \ 0 & 5 & 6 \ 0 & 0 & 9 ] ) = 1 · 5 · 9 = 45 .$] In general, if #math.equation(block: false, alt: "A")[$A$] is triangular, then #math.equation(block: true, alt: "det open parenthesis A close parenthesis equals a sub 11 a sub 22 ⋯ a sub n n .")[$det ( A ) = a_(11) a_(22) ⋯ a_(n n) .$] If #math.equation(block: false, alt: "A")[$A$] is diagonal, then it is also triangular (upper and lower), so same formula applies. For example, #math.equation(block: true, alt: "det open parenthesis [ 2, 0, 0; 0, 3, 0; 0, 0, 5 ] close parenthesis equals 2 times 3 times 5 equals 30 .")[$det ( [ 2 & 0 & 0 \ 0 & 3 & 0 \ 0 & 0 & 5 ] ) = 2 · 3 · 5 = 30 .$] In particular, the identity matrix #math.equation(block: false, alt: "I")[$I$] is diagonal, and the diagonal entries are all 1. Thus, #math.equation(block: true, alt: "det open parenthesis I close parenthesis equals 1 .")[$det ( I ) = 1 .$] The determinant is telling you how geometric objects scale. If #math.equation(block: false, alt: "B")[$B$] doubles the sizes of geometric objects and #math.equation(block: false, alt: "A")[$A$] triples them, then #math.equation(block: false, alt: "A B")[$A B$] (which applies #math.equation(block: false, alt: "B")[$B$] to an object and then it applies #math.equation(block: false, alt: "A")[$A$]) should make size go up by a factor of #math.equation(block: false, alt: "6")[$6$]. This is true in general: #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #math.equation(block: true, alt: "det open parenthesis A B close parenthesis equals det open parenthesis A close parenthesis det open parenthesis B close parenthesis .")[$det ( A B ) = det ( A ) det ( B ) .$] ] This property is one of the most useful, and it is employed often to actually compute determinants. A particularly interesting consequence is to note what it means for the existence of inverses. Take #math.equation(block: false, alt: "A")[$A$] and #math.equation(block: false, alt: "B")[$B$] to be inverses, that is #math.equation(block: false, alt: "A B equals I")[$A B = I$]. Then #math.equation(block: true, alt: "det open parenthesis A close parenthesis det open parenthesis B close parenthesis equals det open parenthesis A B close parenthesis equals det open parenthesis I close parenthesis equals 1 .")[$det ( A ) det ( B ) = det ( A B ) = det ( I ) = 1 .$] Neither #math.equation(block: false, alt: "det open parenthesis A close parenthesis")[$det ( A )$] nor #math.equation(block: false, alt: "det open parenthesis B close parenthesis")[$det ( B )$] can be zero. This fact is an extremely useful property of the determinant, and one which is used often in this book: #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ An #math.equation(block: false, alt: "n times n")[$n × n$] matrix #math.equation(block: false, alt: "A")[$A$] is invertible if and only if #math.equation(block: false, alt: "det open parenthesis A close parenthesis ⧸ equals 0")[$det ( A ) "⧸" = 0$]. ] In fact, #math.equation(block: false, alt: "det open parenthesis A to the power minus 1 close parenthesis det open parenthesis A close parenthesis equals 1")[$det ( A^(− 1) ) det ( A ) = 1$] says that #math.equation(block: true, alt: "det open parenthesis A to the power minus 1 close parenthesis equals the fraction 1 over det open parenthesis A close parenthesis .")[$det ( A^(− 1) ) = frac(1, det ( A )) .$] So we know what the determinant of #math.equation(block: false, alt: "A to the power minus 1")[$A^(− 1)$] is without computing #math.equation(block: false, alt: "A to the power minus 1")[$A^(− 1)$]. Let us return to the formula for the inverse of a #math.equation(block: false, alt: "2 times 2")[$2 × 2$] matrix: #math.equation(block: true, alt: "[ to the power a, b; c, d equals the fraction 1 over a d minus b c [ d, minus b; minus c, a ] .")[$\[^(a & b \ c & d) = frac(1, a d − b c) \[ d & − b \ − c & a \] .$] Notice the determinant of the matrix #math.equation(block: false, alt: "[ a, b; c, d ]")[$[ a & b \ c & d ]$] in the denominator of the fraction. The formula only works if the determinant is nonzero, otherwise we are dividing by zero. A common notation for the determinant is a pair of vertical lines: #math.equation(block: true, alt: "| a, b; c, d | equals det open parenthesis [ a, b; c, d ] close parenthesis .")[$| a & b \ c & d | = det ( [ a & b \ c & d ] ) .$] Personally, I find this notation confusing as vertical lines usually mean a positive quantity, while determinants can be negative. Also think about how to write the absolute value of a determinant. This notation is not used in this book.