Je bent je ingevulde velden bij deze pagina aan het verwijderen. Ben je zeker dat je dit wilt doen?
You are erasing your filled-in fields on this page. Are you sure that is what you want?
Nieuwe Versie BeschikbaarNew Version Available
Er is een update van deze pagina. Als je update naar de meest recente versie, verlies je mogelijk je huidige antwoorden voor deze pagina. Hoe wil je verdergaan ?
There is an updated version of this page. If you update to the most recent version, then your current progress on this page will be erased. Regardless, your record of completion will remain. How would you like to proceed?
Examples in this section provide sample Octave code for answering questions about linear combinations, span, and linear
independence. You can access our code through the link at the bottom of each template. Feel free to modify the code and
experiment to learn more!
You can write your own code using Octave software or online Octave cells. To access Octave cells online, go to the Sage
Math Cell Webpage, select OCTAVE as the language, enter your code, and press EVALUATE.
To ”save" or share your online code, click on the Share button, select Permalink, then copy the address directly from the
browser window. You can store this link to access your work later or share this link with others. You will need to get a new
Permalink every time you modify the code.
Octave Tutorial
If possible, express each of \(\vec {b}_1\) and \(\vec {b}_2\) as a linear combination of vectors in \(W\).
has a non-trivial solution. To do this we will consider an augmented matrix \([\vec {w}_1 \vec {w}_2 \vec {w}_3 | \vec {0}]\).
In the following code, we will skip the zero vector.
We will refer to vectors of \(W\) as \(\vec {w}_1\dots \vec {w}_6\), in order of appearance. We will build a linearly independent set from these vectors by adding
one vector to our set at a time, and checking for linear independence every time a vector is added. If, after adding one vector,
the resulting collection is linearly independent, we will keep the newly added vector, if the collection is not
linearly independent we will discard the new vector and move on to the next. The following code accomplishes
this.
% Define the vectors individually
w1=[12; 10; -20; 5];
w2=[3; -14; 21; 11];
w3=[-6; -38; 62; 17];
w4=[4; -4; 23; 19];
w5=[-6; 6; 47; 30];
w6=[2; 11; 17; 8];
% Clearly {w1} is linearly independent
% Let’s add w2 to the set and check.
rref([w1 w2]) % Looks like w1 and w2 are linearly independent
rref([w1 w2 w3]) % w3 is redundant - this set is linearly dependent. We won’t add w3 to the set
rref([w1 w2 w4]) % these are linearly independent
rref([w1 w2 w4 w5]) % w5 is redundant; don’t add
rref([w1 w2 w4 w6])
By starting with \(\vec {w}_1\), adding vectors to our set one at a time, and checking for linear independence, we determined that \(\vec {w}_3\) and \(\vec {w}_5\) are
redundant and can be removed from the set without changing the span.
Octave Exercises
If possible, express vector \(\vec {b}\) as a linear combination of the vectors in \(W\). If you find a linear combination, verify its correctness
by hand.
There are \(\answer {3}\) redundant vectors in the set.
In Example 5, we constructed a linearly independent set from vectors of \(W\) by starting with \(\vec {w}_1\) and adding one vector at a time to
our set moving from left to right and checking for linear independence at every step. Our resulting set \(\{\vec {w}_1, \vec {w}_2, \vec {w}_4, \vec {w}_6\}\) has the same span as
the original set \(W\). What if we start this process with \(\vec {w}_6\) and move from right to left to identify and remove redundant vectors?
Would we end up with the same final set? Modify the code of Example 5 to find out. Does our final set have the same span as
\(W\)? Prove your claim.