(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.1' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 20004, 641]*) (*NotebookOutlinePosition[ 20692, 665]*) (* CellTagsIndexPosition[ 20648, 661]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Determinants", "Title"], Cell["Math 338: Linear Algebra", "Subtitle"], Cell[CellGroupData[{ Cell["The Definition", "Subsection"], Cell["\<\ There are a number of equivalent ways to define the determinant of a matrix. \ Here are three (there are examples below!):\ \>", "Text"], Cell[TextData[{ StyleBox["Theorem/Definition", FontWeight->"Bold"], ": Let ", Cell[BoxData[ \(TraditionalForm\`A\)]], " be a square ", Cell[BoxData[ \(TraditionalForm\`n\ \[Cross]\ n\)]], " matrix. The following three quantities are equal, and are called the \ determinant of ", Cell[BoxData[ \(TraditionalForm\`A\)]], ".\n\t1)\t", Cell[BoxData[ \(TraditionalForm\`Det[{a}]\ = \ a\)]], ", and if ", Cell[BoxData[ \(TraditionalForm\`n > 1\)]], " then ", Cell[BoxData[ \(TraditionalForm\`Det[ A] = \(a\_11\) A\_11 + \(a\_12\) A\_12 + \[CenterEllipsis] + \(a\_\(1 n\)\) A\_\(1 n\)\)]], ", where ", Cell[BoxData[ \(TraditionalForm\`A\_\(i\ j\)\)]], " is ", Cell[BoxData[ \(TraditionalForm\`\((\(-1\))\)\^\(i + j\)\)]], " times the determinant of the matrix obtained by deleting the entire ", Cell[BoxData[ \(TraditionalForm\`i\)]], "-th row and ", Cell[BoxData[ \(TraditionalForm\`j\)]], "-th column of ", Cell[BoxData[ \(TraditionalForm\`A\)]], ".\n\t2)\tIn computing the reduced row echelon form of ", Cell[BoxData[ \(TraditionalForm\`A\)]], ", we occasionally use the row operation: \"replace a row by a multiple of \ itself\". If the reduced row echelon form of ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is not the identity matrix, then the determinant of ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is 0, and otherwise ", Cell[BoxData[ \(TraditionalForm\`Det[A]\)]], " is the reciprocal of the product of those multiples (the ones used in \ computing the rref) times ", Cell[BoxData[ \(TraditionalForm\`\((\(-1\))\)\^k\)]], ", where ", Cell[BoxData[ \(TraditionalForm\`k\)]], " is the number of times adjacent rows were switched.\n\t3)\tA permutation \ is a map \[Sigma] from ", Cell[BoxData[ \(TraditionalForm\`{1, \ 2, \ \[Ellipsis]\ , \ n}\)]], " onto {1, 2, \[Ellipsis] , n}. (\"onto\" means that for every ", Cell[BoxData[ \(TraditionalForm\`j \[Element] {1, 2, ... , n}\)]], ", there is some ", Cell[BoxData[ \(TraditionalForm\`i \[Element] {1, 2, ... , n}\)]], " with ", Cell[BoxData[ \(TraditionalForm\`\[Sigma](i) = j\)]], "). Write down the list ", Cell[BoxData[ \(TraditionalForm\`\[Sigma](1), \ \[Sigma](2), \ ... , \ \[Sigma]( n)\)]], ", and sort this list into order by swapping adjacent entries: if you used \ an even number set ", Cell[BoxData[ \(TraditionalForm\`sgn(\[Sigma]) = 1\)]], ", and otherwise set ", Cell[BoxData[ \(TraditionalForm\`sgn(\[Sigma]) = \(-1\)\)]], ". The determinant of ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is given by a sum over ", StyleBox["all", FontSlant->"Italic"], " permutations:" }], "Text"], Cell[BoxData[ \(TraditionalForm\`\(\(\t\t\)\(Det[ A] = \[Sum]\+\[Sigma]\( sgn(\[Sigma])\)\ \(a\_\(1, \[Sigma](1)\)\) \(a\_\(2, \[Sigma]( 2)\)\) \(a\_\(3, \[Sigma]( 3)\)\) \[CenterEllipsis]\ \(\(a\_\(n, \[Sigma]( n)\)\)\(.\)\)\)\)\)], "DisplayFormula", FormatType->StandardForm], Cell["\<\ Make sense? If you said \"yes\" then you're not telling the truth. \ \>", "Text"], Cell[TextData[{ "Before we start into the examples, allow me to draw your attention to four \ things. First, the spelling of determinant is with an \"a\", not with an \ \"e\". Second, the determinant of a matrix is not a matrix, it is a number. \ It can be negative, positive, zero, and sometimes even involves the square \ root of ", Cell[BoxData[ \(TraditionalForm\`\(-1\)\)]], ". It is commonly written ", Cell[BoxData[ \(TraditionalForm\`\(\(|\)\(A\)\(|\)\)\)]], " because in some ways it is a generalized absolute value. But it can be \ negative. Third, we have only defined the determinant of square matrices. \ This isn't a matter of convenience, I'm not aware of any reasonable \ definition that extends to non-square matrices. Fourth, the formulas above \ involve quite a bit of multiplication, and will have positive and negative \ numbers even if the matrix entries are all positive; a little bit of \ round-off error can quickly accumulate. In summary, the determinant is a \ single number that tells you something about infinite-precision square \ matrices. " }], "Text"], Cell[CellGroupData[{ Cell["Example of first definition", "Subsubsection"], Cell[TextData[{ "Here it is again: ", Cell[BoxData[ \(TraditionalForm\`Det[{a}]\ = \ a\)]], ", and if ", Cell[BoxData[ \(TraditionalForm\`n > 1\)]], " then\n\t ", Cell[BoxData[ \(TraditionalForm\`Det[ A] = \(a\_11\) A\_11 + \(a\_12\) A\_12 + \[CenterEllipsis] + \(a\_\(1 n\)\) A\_\(1 n\)\)]], ", \nwhere ", Cell[BoxData[ \(TraditionalForm\`A\_\(i\ j\)\)]], " is ", Cell[BoxData[ \(TraditionalForm\`\((\(-1\))\)\^\(i + j\)\)]], " times the determinant of the matrix obtained by deleting the entire ", Cell[BoxData[ \(TraditionalForm\`i\)]], "-th row and ", Cell[BoxData[ \(TraditionalForm\`j\)]], "-th column of ", Cell[BoxData[ \(TraditionalForm\`A\)]], "." }], "Text"], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm\`Det[{3}]\ = \ 3\)]], ", so 1\[Cross]1 matrices are not so interesting." }], "Text"], Cell[TextData[{ "The formula ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"Det", "[", RowBox[{"(", GridBox[{ {"a", "b"}, {"c", "d"} }], ")"}], "]"}], "=", \(a\ d\ - \ b\ c\)}], TraditionalForm]]], " is the only one worth remembering, but 2\[Cross]2 matrices are too small \ to see what's really going on, even though this is just a special case." }], "Text"], Cell[TextData[{ "Let's consider the matrix ", Cell[BoxData[ FormBox[ RowBox[{"A", "=", RowBox[{"(", GridBox[{ {"a", "b", "c"}, {"d", "e", "f"}, {"g", "h", "i"} }], ")"}]}], TraditionalForm]]], ". The definition says that the determinant of ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is the sum\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"a", " ", \(\((\(-1\))\)\^\(1 + 1\)\), RowBox[{"Det", "[", RowBox[{"(", GridBox[{ {"e", "f"}, {"h", "i"} }], ")"}], "]"}]}], "+", RowBox[{\(\(b(\(-1\))\)\^\(1 + 2\)\), RowBox[{"Det", "[", RowBox[{"(", GridBox[{ {"d", "f"}, {"g", "i"} }], ")"}], "]"}]}], "+", RowBox[{\(\(c(\(-1\))\)\^\(1 + 3\)\), RowBox[{"Det", "[", RowBox[{"(", GridBox[{ {"d", "e"}, {"g", "h"} }], ")"}], "]"}]}]}], TraditionalForm]]], ".\nDo you see how this comes from the definition?" }], "Text"], Cell[TextData[{ "Get out a piece of paper and a pencil, and use them to compute the \ determinants of the following matrices:\n\t", Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"1", \(-1\), "3"}, {"1", "0", "0"}, {"1", "2", "2"} }], ")"}], TraditionalForm]]], "\n\t", Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"1", "3", \(-1\)}, {"1", "2", "5"}, {"0", "0", "0"} }], ")"}], TraditionalForm]]], "\n\t", Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"1", "0", "0", "0"}, {"3", \(-2\), "0", "0"}, {\(\(-1\)/2\), "4", "7", "0"}, {"1", "1", "1", "3"} }], ")"}], TraditionalForm]]], "\n\t", Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"5", "2"}, {"7", "5"} }], ")"}], TraditionalForm]]] }], "Text"], Cell[TextData[{ "Here's a theorem:\n", StyleBox["Theorem", FontWeight->"Bold"], ": If an entire row of the square matrix ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is 0, then the determinant of ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is 0.\n\nCan you write a proof of this? Do so. Hint: first observe that \ the Theorem is true if ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is a 1\[Cross]1 matrix. Then, assume that the Theorem is true for every \ ", Cell[BoxData[ \(TraditionalForm\`n\[Cross]n\)]], " matrix, but that ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is an ", Cell[BoxData[ \(TraditionalForm\`\((n + 1)\)\[Cross]\((n + 1)\)\)]], " matrix." }], "Text"], Cell["\<\ Is the following true? \"If you multiply a row of a matrix by 3, then the \ determinant is also multiplied by 3\". Can you prove it?\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Example of second definition", "Subsubsection"], Cell[TextData[{ "Here is the second definition: in computing the reduced row echelon form \ of ", Cell[BoxData[ \(TraditionalForm\`A\)]], ", we occasionally use the row operation: \"replace a row by a multiple of \ itself\". In computing the reduced row echelon form of ", Cell[BoxData[ \(TraditionalForm\`A\)]], ", we occasionally use the row operation: \"replace a row by a multiple of \ itself\". If the reduced row echelon form of ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is not the identity matrix, then the determinant of ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is 0, and otherwise ", Cell[BoxData[ \(TraditionalForm\`Det[A]\)]], " is the reciprocal of the product of those multiples (the ones used in \ computing the rref) times ", Cell[BoxData[ \(TraditionalForm\`\((\(-1\))\)\^k\)]], ", where ", Cell[BoxData[ \(TraditionalForm\`k\)]], " is the number of times adjacent rows were switched." }], "Text"], Cell[TextData[{ "Here's a matrix whose determinant you have calculated on a piece of paper: \ ", Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"1", \(-1\), "3"}, {"1", "0", "0"}, {"1", "2", "2"} }], ")"}], TraditionalForm]]], ". Here's how the forward portion of Gaussian elimination looks:\n", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"(", GridBox[{ {"1", \(-1\), "3"}, {"1", "0", "0"}, {"1", "2", "2"} }], ")"}], "\[Tilde]", RowBox[{"(", GridBox[{ {"1", \(-1\), "3"}, {"0", "1", \(-3\)}, {"1", "2", "2"} }], ")"}], "\[Tilde]", RowBox[{"(", GridBox[{ {"1", \(-1\), "3"}, {"0", "1", \(-3\)}, {"0", "3", \(-1\)} }], ")"}], "\[Tilde]", RowBox[{"(", GridBox[{ {"1", \(-1\), "3"}, {"0", "1", \(-3\)}, {"0", "0", "8"} }], ")"}], "\[Tilde]", RowBox[{"(", GridBox[{ {"1", \(-1\), "3"}, {"0", "1", \(-3\)}, {"0", "0", "1"} }], ")"}]}], TraditionalForm]]], ".\nFor each \"\[Tilde]\", identify the elementary row operation used. Do \ you see how the definition says that the determinant is 8? Why do we only \ need to do the forward portion of Gaussian elimination?" }], "Text"], Cell[TextData[{ "Get out that paper again, and use this method to compute the determinant \ of\n\t", Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"1", "5"}, {\(-1\), "7"} }], ")"}], TraditionalForm]]], "\n\t", Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"1", "3", \(-1\)}, {"1", "7", "0"}, {"2", "6", \(-1\)} }], ")"}], TraditionalForm]]] }], "Text"], Cell["\<\ With this definition, write out a proof that if you multiply a row of the \ matrix by a constant, you multiply the determinant of the matrix by the same \ constant.\ \>", "Text"], Cell[TextData[{ "Here's another nice theorem that is easy to understand from this \ definition: Adding a multiple of one row to another does not change the \ determinant. Here's another: The matrix ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is invertible if and only if its determinant is not 0." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Example of third definition", "Subsubsection"], Cell[TextData[{ "A permutation is a map \[Sigma] from ", Cell[BoxData[ \(TraditionalForm\`{1, \ 2, \ \[Ellipsis]\ , \ n}\)]], " onto {1, 2, \[Ellipsis] , n}. (\"onto\" means that for every ", Cell[BoxData[ \(TraditionalForm\`j \[Element] {1, 2, ... , n}\)]], ", there is some ", Cell[BoxData[ \(TraditionalForm\`i \[Element] {1, 2, ... , n}\)]], " with ", Cell[BoxData[ \(TraditionalForm\`\[Sigma](i) = j\)]], "). Write down the list ", Cell[BoxData[ \(TraditionalForm\`\[Sigma](1), \ \[Sigma](2), \ ... , \ \[Sigma]( n)\)]], ", and sort this list into order by swapping adjacent entries: if you used \ an even number set ", Cell[BoxData[ \(TraditionalForm\`sgn(\[Sigma]) = 1\)]], ", and otherwise set ", Cell[BoxData[ \(TraditionalForm\`sgn(\[Sigma]) = \(-1\)\)]], ". The determinant of ", Cell[BoxData[ \(TraditionalForm\`A\)]], " is given by a sum over ", StyleBox["all", FontSlant->"Italic"], " permutations:", "\n", Cell[BoxData[ \(TraditionalForm\`\(\(\t\t\)\(Det[ A] = \[Sum]\+\[Sigma]\( sgn(\[Sigma])\)\ \(a\_\(1, \[Sigma](1)\)\) \(a\_\(2, \[Sigma]( 2)\)\) \(a\_\(3, \[Sigma]( 3)\)\) \[CenterEllipsis]\ \(\(a\_\(n, \[Sigma]( n)\)\)\(.\)\)\)\)\)]] }], "Text"], Cell["\<\ Why would anyone use this definition!?! It's the one the book uses, so there \ must be a reason and it is this: this definition is the one that makes the \ most proofs easiest.\ \>", "Text"], Cell[TextData[{ "It's actually not as bad as it seems. Start with your matrix: take some of \ the entries so that you have one from each row and one from each column, and \ then multiply them together. In fact, do that in every possible way, and add \ all of them together (with some minus signs). One example may help. Let's \ start with the matrix ", Cell[BoxData[ FormBox[ RowBox[{"A", "=", RowBox[{"(", GridBox[{ {"a", "b"}, {"c", "d"} }], ")"}]}], TraditionalForm]]], ". If you take \"", Cell[BoxData[ \(TraditionalForm\`a, d\)]], "\", then you have one thing from each row and from each column. Another \ way to do this is to take \"", Cell[BoxData[ \(TraditionalForm\`b, c\)]], "\". The determinant is ", Cell[BoxData[ \(TraditionalForm\`\(\[PlusMinus]a\)\ d\ \[PlusMinus] b\ c\)]], ". So how do the signs come out?" }], "Text"], Cell[TextData[{ "Let's get the sign for ", Cell[BoxData[ \(TraditionalForm\`a\ d\)]], ". The thing from the first row is in column 1, and the thing from the \ second row is in column 2, so our list is (1,2), which is already in \ increasing order. We need zero swaps to put this list in order, and zero is \ an even number, so this permutation has ", Cell[BoxData[ \(TraditionalForm\`sgn(\[Sigma]) = 1\)]], ". Now for the sign before ", Cell[BoxData[ \(TraditionalForm\`b\ c\)]], ": the list we get is (2,1), which we need one swap to put in order. One is \ odd, so for this \[Sigma] we have ", Cell[BoxData[ \(TraditionalForm\`sgn(\[Sigma]) = \(-1\)\)]], ". Thus, the determinant is ", Cell[BoxData[ \(TraditionalForm\`\(+a\)\ d\ - b\ c\)]], "." }], "Text"], Cell[TextData[{ "Explain how to use this definition to compute the determinant of ", Cell[BoxData[ FormBox[ RowBox[{"(", "\[NegativeThinSpace]", GridBox[{ {"a", "b", "c"}, {"d", "e", "f"}, {"g", "h", "i"} }], "\[NegativeThinSpace]", ")"}], TraditionalForm]]], "." }], "Text"], Cell[TextData[{ "Prove that switching two adjacent rows multiplies the sign of the \ determinant by ", Cell[BoxData[ \(TraditionalForm\`\(-1\)\)]], "." }], "Text"], Cell["\<\ Prove that replacing a row by itself plus a multiple of another row does not \ change the determinant.\ \>", "Text"], Cell["\<\ Prove that multiplying a row by a constant multiplies the determinant by the \ same constant.\ \>", "Text"], Cell["Prove that this definition implies the first definition.", "Text"], Cell["Prove that this definition implies the second definition.", "Text"] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Use ", StyleBox["Mathematica", FontSlant->"Italic"], " " }], "Subsection"], Cell["\<\ Compute the determinant of the matrix \ {{1,1/2,1/3,1/4},{1/2,1/3,1/4,1/5},{1/3,1/4,1/5,1/6},{1/4,1/5,1/6,1/7}}.\ \>", "Text"], Cell[TextData[{ "Find an ", Cell[BoxData[ \(TraditionalForm\`x\)]], " so that ", Cell[BoxData[ FormBox[ RowBox[{"(", "\[NegativeThinSpace]", GridBox[{ {"1", \(1/2\), \(1/3\), \(1/4\)}, {\(1/2\), \(1/3\), \(1/4\), \(1/5\)}, {\(1/3\), \(1/4\), \(1/5\), \(1/6\)}, {\(1/4\), \(1/5\), \(1/6\), "x"} }], "\[NegativeThinSpace]", ")"}], TraditionalForm]]], " does not have an inverse. How close is ", Cell[BoxData[ \(TraditionalForm\`x\)]], " to ", Cell[BoxData[ \(TraditionalForm\`1/7\)]], "?" }], "Text"] }, Closed]] }, Open ]] }, FrontEndVersion->"5.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 685}}, CellGrouping->Automatic, WindowSize->{957, 651}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, Magnification->1.5 ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 29, 0, 141, "Title"], Cell[1808, 55, 44, 0, 76, "Subtitle"], Cell[CellGroupData[{ Cell[1877, 59, 36, 0, 56, "Subsection"], Cell[1916, 61, 146, 3, 73, "Text"], Cell[2065, 66, 2855, 90, 333, "Text"], Cell[4923, 158, 354, 7, 59, "DisplayFormula"], Cell[5280, 167, 91, 2, 47, "Text"], Cell[5374, 171, 1106, 20, 255, "Text"], Cell[CellGroupData[{ Cell[6505, 195, 52, 0, 40, "Subsubsection"], Cell[6560, 197, 777, 28, 125, "Text"], Cell[7340, 227, 143, 4, 47, "Text"], Cell[7486, 233, 463, 13, 90, "Text"], Cell[7952, 248, 1229, 36, 183, "Text"], Cell[9184, 286, 998, 34, 343, "Text"], Cell[10185, 322, 743, 25, 177, "Text"], Cell[10931, 349, 156, 3, 73, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[11124, 357, 53, 0, 29, "Subsubsection"], Cell[11180, 359, 992, 27, 177, "Text"], Cell[12175, 388, 1536, 42, 233, "Text"], Cell[13714, 432, 489, 17, 157, "Text"], Cell[14206, 451, 188, 4, 73, "Text"], Cell[14397, 457, 322, 7, 99, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[14756, 469, 52, 0, 29, "Subsubsection"], Cell[14811, 471, 1358, 39, 148, "Text"], Cell[16172, 512, 200, 4, 73, "Text"], Cell[16375, 518, 945, 24, 168, "Text"], Cell[17323, 544, 811, 21, 151, "Text"], Cell[18137, 567, 351, 10, 88, "Text"], Cell[18491, 579, 175, 6, 47, "Text"], Cell[18669, 587, 126, 3, 47, "Text"], Cell[18798, 592, 117, 3, 47, "Text"], Cell[18918, 597, 72, 0, 47, "Text"], Cell[18993, 599, 73, 0, 47, "Text"] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[19115, 605, 101, 5, 56, "Subsection"], Cell[19219, 612, 136, 3, 47, "Text"], Cell[19358, 617, 618, 20, 114, "Text"] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)