(***********************************************************************
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[ 8197, 230]*)
(*NotebookOutlinePosition[ 9051, 260]*)
(* CellTagsIndexPosition[ 9007, 256]*)
(*WindowFrame->Normal*)
Notebook[{
Cell[CellGroupData[{
Cell[TextData[StyleBox["Rank of Matrices and Linear \
Systems",
FontFamily->"Times",
FontSize->24]], "Input",
TextAlignment->Center,
ImageRegion->{{-0, 1}, {0, 1}}],
Cell[BoxData[{
\(Author : \ Thomas\ Shores\), "\[IndentingNewLine]",
\(University\ of\ Nebraska\), "\[IndentingNewLine]",
\(Send\ comments\ \(to : \ tshores@math . unl . edu\)\)}], "Input",
FontFamily->"Helvetica",
FontWeight->"Plain",
FontVariations->{"CompatibilityType"->0}],
Cell[CellGroupData[{
Cell["Matrices, Reduced Forms, and Solutions of Linear Systems", "Subsection",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell[TextData[{
"DEFINITION: A matrix R is said to be in ",
StyleBox["row echelon form",
FontSlant->"Italic"],
" if\n (1) The nonzero rows of R precede the zero rows.\n (2) The \
column numbers of the leading entries of the nonzero rows of R , say \
rows 1, 2, ... r, form an increasing sequence of numbers c",
StyleBox["1",
FontVariations->{"CompatibilityType"->"Subscript"}],
" < c",
StyleBox["2",
FontVariations->{"CompatibilityType"->"Subscript"}],
" < .... < c",
StyleBox["r",
FontVariations->{"CompatibilityType"->"Subscript"}],
" .\n (3) Each leading entry of R has only zeros below it.\n",
StyleBox["The matrix R is in ",
FontVariations->{"CompatibilityType"->"Subscript"}],
StyleBox["reduced row echelon form",
FontSlant->"Italic",
FontVariations->{"CompatibilityType"->"Subscript"}],
StyleBox[" if, in addition to the above, \n",
FontVariations->{"CompatibilityType"->"Subscript"}],
" (4) Each leading entry of R is 1.\n (5) Each leading entry of R \
has only zeros above it.\n \n",
StyleBox["Gaussian Elimination",
FontSlant->"Italic"],
" has the goal of reaching row echelon form, then backsolving. But ",
StyleBox["Gauss -Jordan Elimination",
FontSlant->"Italic"],
" has the goal of reaching reduced row echelon form. One of the \
differences between the forms is that a matrix can have more than one row \
reduced form. But it is a remarkable fact that every matrix has one and \
only one row echelon form. That is the content of the following \n \nKEY \
FACT: Every matrix can be reduced by a sequence of elementary row operations \
to\n ONE AND ONLY ONE reduced row echelon form.\n \n\
Once we have this fact, we can define the very useful idea of rank of a \
matrix:"
}], "Text",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell[TextData[{
"DEFINITION: The ",
StyleBox["rank",
FontSlant->"Italic"],
" of a matrix is the number of nonzero rows in the Row Echelon\n \
Form of the matrix. This number is written as rank(A).\n\n\
Here is a simple fact that we can deduce right away from this definition:\n\n\
FACT: Let A be an m",
"\[Cross]",
"n matrix. Then rank(A) ",
"\[LessEqual]",
" Min[ m, n].\n\n ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" will find the Row Echelon Form for us automatically, from which we can \
read off the rank of A:"
}], "Text",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["a = {{1,1,2},{2,2,5},{3,3,7}}", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["MatrixForm[a]", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["r = RowReduce[a]", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["MatrixForm[r]", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["\<\
Try substituting some different matrices for the matrix a in the \
above cell. In particular, build a 5\[Cross]3 matrix and calcualte its \
Row Echelon Form and rank.\
\>", "Text",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell[TextData[{
"Actually, we have seen from earlier discussion that the following key fact \
is true:\n\nKEY FACT: The linear system (LS) with coefficient matrix A and \
right hand side vector b is \n consistent iff rank A \
= rank [A | b], in which case either:\n (1) rank A = n (number of \
unknowns of (LS)), in which case (LS) has a unique solution, or \n (2) \
rank A < n, in which case (LS) has an infinite number of solutions.\n\t\n\
REMARK: Note the consistency condition simply says that the system is \
consistent exactly when no pivot occurs in the last column of the augmented \
matrix. Moreover, if the system is consistent, n - rank A is exactly the \
number of free variables of the system, so that (1) and (2) say that there is \
a unique solution when there are no free variables, and infinitely many \
solutions otherwise.\n\tLet's see how ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" will handle the system with coefficient matrix and right hand side as \
follows:"
}], "Text",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["a = {{1,1,1},{2,2,4},{0,0,1}}", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["b = {2,8,2}", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["LinearSolve[a,b]", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["\<\
Conclusion? Get another view of things by doing the Row Echelon \
Form of the augmented matrix. Click on the next two cells:\
\>", "Text",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["aa={{1,1,1,2},{2,2,4,8},{0,0,1,2}}", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["MatrixForm[aa]", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["MatrixForm[RowReduce[aa]]", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["\<\
Try LinearSolve on the following example (also from the lecture):\
\
\>", "Text",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["a = {{1,1,1},{1,1,2},{1,1,0}}", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["b = {2,4,2}", "Input",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell["LinearSolve[a,b]", "Input",
ImageRegion->{{-0, 1}, {0, 1}}]
}, Closed]],
Cell[CellGroupData[{
Cell["Exercise", "Subsection",
ImageRegion->{{-0, 1}, {0, 1}}],
Cell[TextData[{
"Determine the solvability of the following systems using (a) the row \
echelon form and (b) a direct ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" function:\n\n1) 5 x + 3 y - 4 z = 0\n x - y + z = 5\
\n 3 x + 2 y + 9 z = -1\n \n2) x + 2 y + 3 z = 4\n \
4 x + 5 y + 6 z = 7\n 7 x + 8 y + 9 z = 10\n x - y + \
z = 0 \n \n3) 6 a + 5 b - c = 5\n a + 2 b \
+ 3 c = 5 \n 3 a - b - 10 c = -8 "
}], "Text",
ImageRegion->{{-0, 1}, {0, 1}}]
}, Closed]]
}, Closed]]
},
FrontEndVersion->"4.0 for X",
ScreenRectangle->{{0, 1152}, {0, 864}},
WindowToolbars->{},
CellGrouping->Manual,
WindowSize->{520, 600},
WindowMargins->{{Automatic, 308}, {104, Automatic}},
PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}},
ShowCellLabel->True,
ShowCellTags->False,
RenderingOptions->{"ObjectDithering"->True,
"RasterDithering"->False}
]
(***********************************************************************
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, 172, 5, 40, "Input"],
Cell[1914, 58, 297, 6, 64, "Input"],
Cell[CellGroupData[{
Cell[2236, 68, 112, 1, 45, "Subsection"],
Cell[2351, 71, 1881, 39, 70, "Text"],
Cell[4235, 112, 638, 17, 70, "Text"],
Cell[4876, 131, 80, 1, 70, "Input"],
Cell[4959, 134, 64, 1, 70, "Input"],
Cell[5026, 137, 67, 1, 70, "Input"],
Cell[5096, 140, 64, 1, 70, "Input"],
Cell[5163, 143, 229, 5, 70, "Text"],
Cell[5395, 150, 1089, 18, 70, "Text"],
Cell[6487, 170, 80, 1, 70, "Input"],
Cell[6570, 173, 62, 1, 70, "Input"],
Cell[6635, 176, 67, 1, 70, "Input"],
Cell[6705, 179, 184, 4, 70, "Text"],
Cell[6892, 185, 85, 1, 70, "Input"],
Cell[6980, 188, 65, 1, 70, "Input"],
Cell[7048, 191, 76, 1, 70, "Input"],
Cell[7127, 194, 125, 4, 70, "Text"],
Cell[7255, 200, 80, 1, 70, "Input"],
Cell[7338, 203, 62, 1, 70, "Input"],
Cell[7403, 206, 67, 1, 70, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[7507, 212, 64, 1, 29, "Subsection"],
Cell[7574, 215, 595, 11, 70, "Text"]
}, Closed]]
}, Closed]]
}
]
*)
(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)