Math211.1.2

129 days ago by Jesse_Berwald

# Math 211. Section 1.2 
       
# 3 
       
A = matrix(QQ,[[1,2,4,8],[2,4,6,8],[3,6,9,12]]);A 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 4 & 8 \\
2 & 4 & 6 & 8 \\
3 & 6 & 9 & 12
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 4 & 8 \\
2 & 4 & 6 & 8 \\
3 & 6 & 9 & 12
\end{array}\right)
A.add_multiple_of_row(1,0,-2) A.add_multiple_of_row(2,0,-3) A 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 4 & 8 \\
0 & 0 & -2 & -8 \\
0 & 0 & -3 & -12
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 4 & 8 \\
0 & 0 & -2 & -8 \\
0 & 0 & -3 & -12
\end{array}\right)
A.rescale_row(1,-1/2);A 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 4 & 8 \\
0 & 0 & 1 & 4 \\
0 & 0 & -3 & -12
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 4 & 8 \\
0 & 0 & 1 & 4 \\
0 & 0 & -3 & -12
\end{array}\right)
A.add_multiple_of_row(2,1,3);A 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 4 & 8 \\
0 & 0 & 1 & 4 \\
0 & 0 & 0 & 0
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 4 & 8 \\
0 & 0 & 1 & 4 \\
0 & 0 & 0 & 0
\end{array}\right)
A.add_multiple_of_row(0,1,-4);A 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 0 & -8 \\
0 & 0 & 1 & 4 \\
0 & 0 & 0 & 0
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 2 & 0 & -8 \\
0 & 0 & 1 & 4 \\
0 & 0 & 0 & 0
\end{array}\right)
# Pivot positions are (0,0) and (1,2), in 0-based indexing. Pivot columns can be read off of these as 0 and 2. # If you just want to check your answers after computing with pencil and paper, use A.rref() ("reduced row echelon form"). 
       
# 7 
       
B = matrix(QQ,[[1,3,4,7],[3,9,7,6]]) B 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 3 & 4 & 7 \\
3 & 9 & 7 & 6
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 3 & 4 & 7 \\
3 & 9 & 7 & 6
\end{array}\right)
B.rref() 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 3 & 0 & -5 \\
0 & 0 & 1 & 3
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
1 & 3 & 0 & -5 \\
0 & 0 & 1 & 3
\end{array}\right)
# The solution is # x_1 = -5 -3x_2 # x_2 free # x_3 = 3 # There is no equation such as "0=1", so the system is consistent. The solution exists, but is _not_ unique, owing to the free variable x_2. 
       
# 17 
       
var('h', domain=RR) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}h
\newcommand{\Bold}[1]{\mathbf{#1}}h
M = matrix(SR,[[1,-1,4],[-2,3,h]]) M 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
1 & -1 & 4 \\
-2 & 3 & h
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
1 & -1 & 4 \\
-2 & 3 & h
\end{array}\right)
M.rref() 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
1 & 0 & h + 12 \\
0 & 1 & h + 8
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
1 & 0 & h + 12 \\
0 & 1 & h + 8
\end{array}\right)
# x_1 = h+12 # x_2 = h+8 # M has a solution for all values of h