| Download
All published worksheets from http://sagenb.org
Project: sagenb.org published worksheets
Views: 168690Image: ubuntu2004
Section 1.1
# 13
Note that "#" starts a comment which will not be evaluated by Sage. Thus, the matrix A is defined below, but everything on the same line after "#" is ignored.
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(8,\,7,\,-2\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)
Therefore, the solution vector is (5,3,-1). This should concur with your paper and pencil computations.
# 15. Instead of "rref", we'll proceed using the matrix's built-in elementary row operations. Note, each row operation below alters the matrix M "in place"
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)
The system is inconsistent. The last line requires that 0=-8 in order for a solution to exist.
#25
Define new variables g,h,k. The "domain=QQ" is Sage's way of saying make the variables rationals. You could also make them reals (decimals in this case) by typing "RR" instead of "QQ". This forces the row reductions to output decimal answers (which in my opinion are not as nice).
\newcommand{\Bold}[1]{\mathbf{#1}}\left(g, h, k\right)
The parent() function is just telling us that Sage stores g as a symbolic representation (SR), as opposed to a real (RR) or rational (QQ).
\newcommand{\Bold}[1]{\mathbf{#1}}\text{SR}
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\right)