(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. 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[ 7776, 245]*) (*NotebookOutlinePosition[ 8457, 269]*) (* CellTagsIndexPosition[ 8413, 265]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Areas, Volumes and Determinants", "Title", CellFrame->True, TextAlignment->Center, Background->RGBColor[0, 1, 0]], Cell["\<\ This notebook is by Steven Amgott. Please send any questions or \ comments to samgott1@swarthmore.edu. Feel free to use and distribute this \ notebook, but keep this author information in any copy you use or distribute.\ \ \>", "SmallText"], Cell[CellGroupData[{ Cell["Areas and determinants of a 2 by 2 matrix", "Section"], Cell[CellGroupData[{ Cell["An example.", "Subsection"], Cell["\<\ The following input cell creates and draws a unit square. We will \ operate on the square by 2\[Times]2 matrices and compare the area of the \ resulting parallelogram to the determinant of the matrix.\ \>", "Text"], Cell[BoxData[{ \(Clear[square]\), "\n", \(\(square = {{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}};\)\), "\n", \(\(ListPlot[square, PlotJoined -> True, PlotRange -> {{\(-5\), 5}, {\(-5\), 5}}, AspectRatio -> 1];\)\)}], "Input"], Cell["\<\ Here's a matrix. We will let it operate on the square, and draw \ the plot.\ \>", "Text"], Cell[BoxData[{\(Clear[a]\), "\n", RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {"1", "2"}, {"3", \(-4\)} }], ")"}]}], ";", "\n", \(a . {1, 0}\)}], "\n", \(a . {0, 1}\), "\n", \(ListPlot[ Transpose[a . Transpose[square]], PlotJoined -> True, PlotRange -> {{\(-10\), 10}, {\(-10\), 10}}, AspectRatio -> 1];\)}], "Input"], Cell["\<\ We can find the area of the parallelogram by adding 0 as the third \ coordinate to the vectors forming the sides, and then taking the magnitude of \ the cross product of the two vectors (as we learned in Multivariable \ Calculus).\ \>", "Text"], Cell[BoxData[ \(\[Sqrt]\((Cross[Append[a . {1, 0}, 0], Append[a . {0, 1}, 0]] . Cross[Append[a . {1, 0}, 0], Append[a . {0, 1}, 0]])\)\)], "Input"], Cell["Let's compare this with the determinant of the matrix a.", "Text"], Cell[BoxData[ \(Det[a]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Arbitrary matrices", "Subsection"], Cell["\<\ We can repeat the above using an arbitrary matrix (except for \ drawing the picture of the transformed square).\ \>", "Text"], Cell[BoxData[{\(Clear[a, b, c, d, e]\), RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {"b", "c"}, {"d", "e"} }], ")"}]}], ";", "\n", \(a . {1, 0}\)}], \(a . {0, 1}\)}], "Input"], Cell["\<\ We can find the area of the parallelogram by adding 0 as the third \ coordinate to the vectors forming the sides, and then taking the magnitude of \ the cross product of the two vectors.\ \>", "Text"], Cell[BoxData[ \(\[Sqrt]\(( Cross[Append[a . {1, 0}, 0], Append[a . {0, 1}, 0]] . Cross[Append[a . {1, 0}, 0], Append[a . {0, 1}, 0]])\)\)], "Input"], Cell["Let's compare this with the determinant of the matrix a.", "Text"], Cell[BoxData[ \(Det[a]\)], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Volumes and determinants of a 3 by 3 matrix", "Section"], Cell[CellGroupData[{ Cell["An example", "Subsection"], Cell["\<\ This time we will create a unit cube. We will operate on the cube \ with a 3\[Times]3 matrix, and compare the volume of the resulting \ parallelopiped to the the determinant of the matrix.\ \>", "Text"], Cell[BoxData[{ \(Needs["\"]\), "\[IndentingNewLine]", \(\(cube = {{0, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 1}, {0, 1, 0}, {0, 1, 1}, {1, 1, 1}, {1, 1, 0}, {1, 1, 1}, {1, 0, 1}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}};\)\), "\[IndentingNewLine]", \(\(ScatterPlot3D[cube, PlotJoined \[Rule] True, Boxed \[Rule] False, PlotRange \[Rule] {{\(-6\), 6}, {\(-6\), 6}, {\(-6\), 6}}];\)\)}], "Input"], Cell[BoxData[{\(Clear[v]\), "\n", RowBox[{ RowBox[{"v", "=", RowBox[{"(", GridBox[{ {"1", "0", "3"}, {"1", "3", "2"}, {"2", "2", "1"} }], ")"}]}], ";"}], "\[IndentingNewLine]", \(v . {1, 0, 0}\), "\n", \(v . {0, 1, 0}\), "\n", \(v . {0, 0, 1}\), "\[IndentingNewLine]", \(ScatterPlot3D[ Transpose[v . Transpose[cube]], PlotJoined \[Rule] True, Boxed \[Rule] False, PlotRange \[Rule] {{\(-6\), 6}, {\(-6\), 6}, {\(-6\), 6}}];\)}], "Input"], Cell["\<\ We can find the volume of the parallelopiped formed by applying v \ to the unit cube by using the absolute value of the scalar triple product of \ vectors forming the three sides of the parallelopiped intersecting at a point \ (as we learned in Multivariable Calculus).\ \>", "Text"], Cell[BoxData[ \(Abs[\((v . {1, 0, 0})\) . Cross[v . {0, 1, 0}, v . {0, 0, 1}]]\)], "Input"], Cell["Let's compare this with the determinant of the matrix v.", "Text"], Cell[BoxData[ \(Det[v]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Arbitrary matrices", "Subsection"], Cell[BoxData[{\(Clear[v, b, c, d, e, f, g, h, i, j]\), RowBox[{ RowBox[{"v", "=", RowBox[{"(", GridBox[{ {"b", "c", "d"}, {"e", "f", "g"}, {"h", "i", "j"} }], ")"}]}], ";", "\n", \(v . {1, 0, 0}\)}], \(v . {0, 1, 0}\), \(v . {0, 0, 1}\)}], "Input"], Cell["\<\ We can find the volume of the parallelopiped formed by applying v \ to the unit cube by using the scalar triple product of three sides of the \ parallelopiped that intersect at a point. Don't forget that we need to take \ an absolute value of the result of this next cell.\ \>", "Text"], Cell[BoxData[ \(\((v . {1, 0, 0})\) . Cross[v . {0, 1, 0}, v . {0, 0, 1}]\)], "Input"], Cell[BoxData[ \(Expand[%]\)], "Input"], Cell["Let's compare this with the determinant of the matrix v.", "Text"], Cell[BoxData[ \(Det[v]\)], "Input"] }, Closed]] }, Closed]] }, Open ]] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 720}}, WindowToolbars->"EditBar", WindowSize->{546, 593}, WindowMargins->{{13, Automatic}, {Automatic, 1}} ] (*********************************************************************** 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[1739, 51, 125, 3, 166, "Title"], Cell[1867, 56, 252, 5, 44, "SmallText"], Cell[CellGroupData[{ Cell[2144, 65, 60, 0, 53, "Section"], Cell[CellGroupData[{ Cell[2229, 69, 33, 0, 47, "Subsection"], Cell[2265, 71, 225, 4, 52, "Text"], Cell[2493, 77, 254, 5, 90, "Input"], Cell[2750, 84, 100, 3, 33, "Text"], Cell[2853, 89, 418, 10, 143, "Input"], Cell[3274, 101, 254, 5, 71, "Text"], Cell[3531, 108, 162, 2, 52, "Input"], Cell[3696, 112, 72, 0, 33, "Text"], Cell[3771, 114, 39, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[3847, 120, 40, 0, 31, "Subsection"], Cell[3890, 122, 135, 3, 52, "Text"], Cell[4028, 127, 246, 7, 103, "Input"], Cell[4277, 136, 210, 4, 52, "Text"], Cell[4490, 142, 171, 3, 52, "Input"], Cell[4664, 147, 72, 0, 33, "Text"], Cell[4739, 149, 39, 1, 30, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[4827, 156, 62, 0, 33, "Section"], Cell[CellGroupData[{ Cell[4914, 160, 32, 0, 47, "Subsection"], Cell[4949, 162, 213, 4, 52, "Text"], Cell[5165, 168, 516, 8, 150, "Input"], Cell[5684, 178, 570, 13, 183, "Input"], Cell[6257, 193, 293, 5, 71, "Text"], Cell[6553, 200, 104, 2, 30, "Input"], Cell[6660, 204, 72, 0, 33, "Text"], Cell[6735, 206, 39, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[6811, 212, 40, 0, 31, "Subsection"], Cell[6854, 214, 327, 8, 143, "Input"], Cell[7184, 224, 297, 5, 71, "Text"], Cell[7484, 231, 90, 1, 30, "Input"], Cell[7577, 234, 42, 1, 30, "Input"], Cell[7622, 237, 72, 0, 33, "Text"], Cell[7697, 239, 39, 1, 30, "Input"] }, Closed]] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)