Skip to main content\(\newcommand{\R}{\mathbb R}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 1.1 Three elementary row operations
The ideas of system of linear equations.
To solve a system of linear equations, the brilliant idea is to find an equivalent linear system
which is much esaier to solve.
Write the system of linear equations into augmented matrix.
Use three elementary row operations to get the reduced row echelon form of the matrix, which can be understood as another system of linear equations.
The key point here is the two linear systems have the same solution set.
Write down the general solution.
After finishing this section, you will learn the following.
How to input a regular matrix
How to input a matrix involving variables
Subsection 1.1.1 How to input a regular matrix
Example: Input the matrix below to the SageMath cell.
\begin{equation*}
\begin{pmatrix}
0 \amp 2 \amp -8 \amp 8 \\
1 \amp -2 \amp 1 \amp 0 \\
5 \amp 0 \amp -5 \amp 10
\end{pmatrix}
\end{equation*}
Exercise: Input the matrix below to the SageMath cell.
\begin{equation*}
\begin{pmatrix}
0 \amp 3 \amp -6 \amp 6 \amp 4 \amp -5 \\
3 \amp -7 \amp 8 \amp -5 \amp 8 \amp 9 \\
3 \amp -9 \amp 12 \amp -9 \amp 6 \amp 15
\end{pmatrix}
\end{equation*}
Subsection 1.1.2 How to input a matrix with variables
In SageMath, the variable \(x\) is automatically variable. All the others must be declared.
Example: Input the matrix below to the SageMath cell.
\begin{equation*}
\begin{pmatrix}
a \amp 1\\
3 \amp x
\end{pmatrix}
\end{equation*}
This example is extremely important in this course.
Subsection 1.1.3 Three elementary row operations
Recall that there are three elementary row operations. These row operations are reversible.
Add a multiple of a row to another row.
Multiply a row by a nonzero constant.
Interchange two rows.
Example:
1. Exchange the first and second rows of the matrix \(A\) below.
\begin{equation*}
A=\begin{pmatrix}
0 \amp 2 \amp -8 \amp 8 \\
1 \amp -2 \amp 1 \amp 0 \\
5 \amp 0 \amp -5 \amp 10
\end{pmatrix}
\end{equation*}
Pay attention to the matrix \(A\text{.}\)2. Add -5 times of row 1 to row 3.
Exercise: Add -5 times of row 2 to row 3.
3. Multiply \(\frac{1}{30}\) to row 3.
Exercise: Multiply \(\frac{1}{2}\) to row 2.
The matrix \(A\) is called in echelon form.
Exercise: Find the echelon form of the matrix \(B\) below by the methods of elementary row operations, which the leading entries are all one.
\begin{equation*}
B=\begin{pmatrix}
0 \amp 3 \amp -6 \amp 6 \amp 4 \amp -5 \\
3 \amp -7 \amp 8 \amp -5 \amp 8 \amp 9 \\
3 \amp -9 \amp 12 \amp -9 \amp 6 \amp 15
\end{pmatrix}
\end{equation*}
Exercise: Find the reduced row echelon form of the matrices \(A\) and \(B\text{,}\) respectively.