Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168733
Image: ubuntu2004
Section 1.7
# 11a (First define a new variable h.) h = var('h')
# Is v_3 in the span of v_1 and v_2?? I.e., does x_1*v_1 + x_2*v_2 = v_3 have a solution? This is just a system of linear equations: A = matrix(SR,[[1,-3,5],[-3,9,-7],[2,-6,h]]) A
\newcommand{\Bold}[1]{\mathbf{#1}}\left(13539726h\begin{array}{rrr} 1 & -3 & 5 \\ -3 & 9 & -7 \\ 2 & -6 & h \end{array}\right)
A.rref()
\newcommand{\Bold}[1]{\mathbf{#1}}\left(130001000\begin{array}{rrr} 1 & -3 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{array}\right)
# 0=1 implies that there is no solution to the system of equations. In particular, v_3 cannot be obtained from a linear combination of v_1 and v_2, so it is not in Span{v_1,v_2}.
# 11b Is {v_1,v_2,v_3} linearly dependent? I.e., does x_1*v_1 + x_2*v_2 + x_3*v_3 = 0 have a solution? L=A.augment(vector(SR,[0,0,0]).column()) L
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1350397026h0\begin{array}{rrrr} 1 & -3 & 5 & 0 \\ -3 & 9 & -7 & 0 \\ 2 & -6 & h & 0 \end{array}\right)
L.rref()
\newcommand{\Bold}[1]{\mathbf{#1}}\left(130000100000\begin{array}{rrrr} 1 & -3 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right)
# For all h, x_1 = 3x_2 and x_3 = 0, while x_2 is free. Thus, there is a nontrivial solution to the above equation for any h.