1 Star 0 Fork 0

chenglibo/gt-linalg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
spans.xml 18.20 KB
一键复制 编辑 原始数据 按行查看 历史
<?xml version="1.0" encoding="UTF-8"?>
<!--********************************************************************
Copyright 2017 Georgia Institute of Technology
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation. A copy of
the license is included in gfdl.xml.
*********************************************************************-->
<section xml:id="spans">
<title>Vector Equations and Spans</title>
<objectives>
<ol>
<li>Understand the equivalence between a system of linear equations and a vector equation.</li>
<li>Learn the definition of <m>\Span\{x_1,x_2,\ldots,x_k\}</m>, and how to draw pictures of spans.</li>
<li><em>Recipe:</em> solve a vector equation using augmented matrices / decide if a vector is in a span.</li>
<li><em>Pictures:</em> an inconsistent system of equations, a consistent system of equations, spans in <m>\R^2</m> and <m>\R^3</m>.</li>
<li><em>Vocabulary word:</em> <term>vector equation</term>.</li>
<li><em>Essential vocabulary word:</em> <term>span</term>.</li>
</ol>
</objectives>
<subsection>
<title>Vector Equations</title>
<p>
<idx><h>Vector equation</h><h>equivalence with system of equations</h></idx>
An equation involving vectors with <m>n</m> coordinates is the same as <m>n</m> equations involving only numbers. For example, the equation
<me>x\vec{1 2 6} + y \vec{-1 -2 -1} = \vec{8 16 3}</me>
simplifies to
<me>\vec{ x 2x 6x} + \vec{-y -2y -y} = \vec{8 16 3}
\sptxt{or}
\spalignsysdelims()\syseq{ x - y; 2x - 2y; 6x - y} = \vec{8 16 3}.
</me>
For two vectors to be equal, all of their coordinates must be equal, so this is just the system of linear equations
<me>\spalignsysdelims\{.\syseq{x - y = 8; 2x - 2y = 16; 6x - y = 3\rlap.}</me>
</p>
<definition>
<idx><h>Vector equation</h><h>definition of</h></idx>
<statement>
<p>A <term>vector equation</term> is an equation involving a linear combination of vectors with possibly unknown coefficients.</p>
</statement>
</definition>
<bluebox>
<p>Asking whether or not a vector equation has a solution is the same as asking if a given vector is a linear combination of some other given vectors.
</p>
</bluebox>
<p>For example the vector equation above is asking if the vector <m>(8,16,3)</m> is a linear combination of the vectors <m>(1,2,6)</m> and <m>(-1,2,-1)</m>.</p>
<p>The thing we really care about is solving systems of linear equations, not solving vector equations. The whole point of vector equations is that they give us a different, and more geometric, way of viewing systems of linear equations.</p>
<note hide-type="true">
<title>A Picture of a Consistent System</title>
<idx><h>Vector equation</h><h>consistent</h><see>System of linear equations, consistent</see></idx>
<idx><h>Vector equation</h><h>inconsistent</h><see>System of linear equations, inconsistent</see></idx>
<idx><h>System of linear equations</h><h>consistent</h><h>picture of</h></idx>
<p>Below we will show that the above system of equations is consistent. Equivalently, this means that the above vector equation has a solution. In other words, there is a linear combination of <m>(1,2,6)</m> and <m>(-1,2,-1)</m> that equals <m>(8,16,3)</m>. We can visualize the last statement geometrically. Therefore, the following <xref ref="vectors-figure-consistent"/> gives a <em>picture of a consistent system of equations</em>. Compare with <xref ref="vectors-fig-inconsistent"/> below, which shows a picture of an inconsistent system.
</p>
</note>
<figure xml:id="vectors-figure-consistent">
<caption>A picture of the above vector equation. Try to solve the equation geometrically by moving the sliders.</caption>
<mathbox source="demos/spans.html?v1=1,2,6&amp;v2=-1,-2,-1&amp;target=8,16,3&amp;range=20&amp;camera=3,.5,1.5" height="500px"/>
</figure>
<p>In order to actually solve the vector equation
<me>x\textcolor{seq-red}{\vec{1 2 6}}
+ y \textcolor{seq-green}{\vec{-1 -2 -1}}
= \textcolor{seq-blue}{\vec{8 16 3}},</me>
one has to solve the system of linear equations
<me>\spalignsysdelims\{.\syseq{x - y = 8; 2x - 2y = 16; 6x - y = 3\rlap.}</me>
This means forming the augmented matrix
<me>\def\r{\color{seq-red}}\def\g{\color{seq-green}}\def\b{\color{seq-blue}}
\amat{\r1 \g-1 \b8; \r2 \g-2 \b16; \r6 \g-1 \b3}</me>
and row reducing. Note that <em>the columns of the augmented matrix are the vectors from the original vector equation</em>, so it is not actually necessary to write the system of equations: one can go directly from the vector equation to the augmented matrix by <q>smooshing the vectors together</q>. In the following <xref ref="vectors-example-consistent"/> we carry out the row reduction and find the solution.
</p>
<example xml:id="vectors-example-consistent">
<statement>
<p>Is <m>\vec{ 8 16 3}</m> a linear combination of <m>\vec{1 2 6}</m> and <m>\vec{-1 -2 -1}</m>?
</p>
</statement>
<solution>
<p>As discussed above, this question boils down to a row reduction:
<me>\amat{1 -1 8; 2 -2 16; 6 -1 3}
\quad\xrightarrow{\text{RREF}}\quad
\amat{1 0 -1; 0 1 -9; 0 0 0}.
</me>
From this we see that the equation is consistent, and the solution is <m>x=-1</m> and <m>y=-9</m>. We conclude that <m>\vec{ 8 16 3}</m> is indeed a linear combination of <m>\vec{1 2 6}</m> and <m>\vec{-1 -2 -1}</m>, with coefficients <m>-1</m> and <m>-9</m>:
<me>-\vec{1 2 6} -9\vec{-1 -2 -1} = \vec{8 16 3}.
</me>
</p>
</solution>
</example>
<bluebox>
<title>Recipe: Solving a vector equation</title>
<idx><h>Vector equation</h><h>solving</h></idx>
<p>In general, the vector equation
<me>x_1v_1 + x_2v_2 + \cdots + x_kv_k = b</me>
where <m>v_1,v_2,\ldots,v_k,\,b</m> are vectors in <m>\R^n</m> and <m>x_1,x_2,\ldots,x_k</m> are unknown scalars, has the same solution set as the linear system with augmented matrix
<me>\amat[c]{| | ,{} , | |; v_1 v_2 \cdots, v_k b; | | ,{} , | |}</me>
whose columns are the <m>v_i</m><rsq/>s and the <m>b</m><rsq/>s.
</p>
</bluebox>
<p>Now we have <em>three</em> equivalent ways of thinking about a linear system:
<ol>
<li>As a system of equations:
<me>\syseq{2x_1 + 3x_2 - 2x_3 = 7; x_1 - x_2 - 3x_3 = 5}
</me>
</li>
<li>As an augmented matrix:
<me>\amat{2 3 -2 7; 1 -1 -3 5}</me>
</li>
<li>As a vector equation (<m>x_1v_1 + x_2v_2 + \cdots + x_nv_n = b</m>):
<me>x_1\vec{2 1} + x_2\vec{3 -1} + x_3\vec{-2 -3} = \vec{7 5}</me>
</li>
</ol>
The third is geometric in nature: it lends itself to drawing pictures.
</p>
</subsection>
<subsection>
<title>Spans</title>
<p>It will be important to know what are <em>all</em> linear combinations of a set of vectors <m>v_1,v_2,\ldots,v_k</m> in <m>\R^n</m>. In other words, we would like to understand the set of all vectors <m>b</m> in <m>\R^n</m> such that the vector equation (in the unknowns <m>x_1,x_2,\ldots,x_k</m>)
<me>x_1v_1 + x_2v_2 + \cdots + x_kv_k = b</me>
has a solution (i.e. is consistent).
</p>
<essential xml:id="vectors-defn-span">
<idx><h>Span</h><h>definition of</h></idx>
<statement>
<p>Let <m>v_1,v_2,\ldots,v_k</m> be vectors in <m>\R^n</m>. The <term>span</term> of <m>v_1,v_2,\ldots,v_k</m> is the collection of all linear combinations of <m>v_1,v_2,\ldots,v_k</m>, and is denoted <m>\Span\{v_1,v_2,\ldots,v_k\}</m>. In symbols:
<notation><usage>\Span\{v_1,v_2,\ldots,v_k\}</usage><description>Span of vectors</description></notation>
<me>\Span\{v_1,v_2,\ldots,v_k\} =
\bigl\{x_1v_1 + x_2v_2 + \cdots + x_kv_k \mid x_1,x_2,\ldots,x_k \text{ in }\R\bigr\}</me>
We also say that <m>\Span\{v_1,v_2,\ldots,v_k\}</m> is the subset <term>spanned by</term> or <term>generated by</term> the vectors <m>v_1,v_2,\ldots,v_k</m>.
</p>
</statement>
</essential>
<p>The above <xref ref="vectors-defn-span"/> is the first of several <em>essential definitions</em> that we will see in this textbook. They are essential in that they form the essence of the subject of linear algebra: learning linear algebra means (in part) learning these definitions. All of the definitions are important, but it is essential that you learn and understand the definitions marked as such.
</p>
<note hide-type="true" xml:id="set-builder-notation">
<title>Set Builder Notation</title>
<idx><h>Set builder notation</h></idx>
<idx><h>Subset</h><h>set builder notation</h></idx>
<p>The notation
<notation><usage>\{x\mid\text{condition}\}</usage><description>Set builder notation</description></notation>
<me>\bigl\{x_1v_1 + x_2v_2 + \cdots + x_kv_k \mid x_1,x_2,\ldots,x_k \text{ in }\R\bigr\}</me>
reads as: <q>the set of all things of the form <m>x_1v_1 + x_2v_2 + \cdots + x_kv_k</m> such that <m>x_1,x_2,\ldots,x_k</m> are in <m>\R</m>.</q> The vertical line is <q>such that</q>; everything to the left of it is <q>the set of all things of this form</q>, and everything to the right is the condition that those things must satisfy to be in the set. Specifying a set in this way is called <term>set builder notation</term>.
</p>
<p>All mathematical notation is only shorthand: any sequence of symbols must translate into a usual sentence.</p>
</note>
<note hide-type="true">
<title>Three characterizations of consistency</title>
<idx><h>System of linear equations</h><h>consistent</h><h>span criterion</h></idx>
<p>Now we have three equivalent ways of making the same statement:
<ol>
<li>A vector <m>b</m> is in the span of <m>v_1,v_2,\ldots,v_k</m>.</li>
<li>The vector equation
<me>x_1v_1 + x_2v_2 + \cdots + x_kv_k = b</me>
has a solution.
</li>
<li>The linear system with augmented matrix
<me>\amat[c]{| | ,{} , | |; v_1 v_2 \cdots, v_k b; | | ,{} , | |}</me>
is consistent.
</li>
</ol>
</p>
</note>
<p><term>Equivalent</term> means that, for any given list of vectors <m>v_1,v_2,\ldots,v_k,\,b</m>, either all three statements are true, or all three statements are false.</p>
<figure xml:id="vectors-fig-inconsistent">
<caption>This is a picture of an <em>inconsistent</em> linear system: the vector <m>w</m> on the right-hand side of the equation <m>x_1v_1 + x_2v_2 = w</m> is not in the span of <m>v_1,v_2</m>. Convince yourself of this by trying to solve the equation
<m>x_1v_1 + x_2v_2 = w</m>
by moving the sliders, and by row reduction. Compare this <xref ref="vectors-figure-consistent"/>.</caption>
<idx><h>System of linear equations</h><h>inconsistent</h><h>picture of</h></idx>
<mathbox source="demos/spans.html?v1=1,2,6&amp;v2=-1,-2,-1&amp;target=2,-2,0&amp;range=8&amp;camera=3,.5,1.5" height="500px"/>
</figure>
<paragraphs>
<title>Pictures of Spans</title>
<idx><h>Span</h><h>pictures of</h></idx>
<p>Drawing a picture of <m>\Span\{v_1,v_2,\ldots,v_k\}</m> is the same as drawing a picture of all linear combinations of <m>v_1,v_2,\ldots,v_k</m>.</p>
<figure>
<caption>Pictures of spans in <m>\R^2</m>.</caption>
<image>
<latex-image-code>
<![CDATA[
\begin{tikzpicture}[thin border nodes, scale=.9]
\begin{scope}
\draw[grid lines] (-3,-2) grid (4, 3);
\path[clip] (-3,-2) rectangle (4, 3);
\draw[thin, seq4] ($-2*(2,1)$) -- ($2*(2,1)$);
\node[seq4,whitebg] at (0,2) {$\Span\{v\}$};
\draw[vector, seq1] (0,0) to["$v$"] (2,1);
\point at (0,0);
\end{scope}
\begin{scope}[xshift=8cm]
\draw[grid lines] (-3,-2) grid (4, 3);
\fill[seq4!30, nearly transparent] (-3,-2) rectangle (4,3);
\node[seq4] at (.5,2.5) {$\Span\{v,w\}$};
\draw[vector, seq1] (0,-1) to["$v$"] (1,1);
\draw[vector, seq2] (0,-1) to["\strut$w$"'] (1,-1);
\point at (0,-1);
\end{scope}
\begin{scope}[xshift=4cm, yshift=-7cm]
\draw[grid lines] (-3,-3) grid (4, 4);
\path[clip] (-3,-3) rectangle (4, 4);
\node[seq4] at (.5,2.5) {$\Span\{v,w\}$};
\draw[thin, seq4] ($-2*(2,2)$) -- ($2*(2,2)$);
\draw[vector, seq1] (0,0) to["$v$"] (2,2);
\draw[vector, seq2] (0,0) to["$w$"' pos=.4] (-1,-1);
\point at (0,0);
\end{scope}
\end{tikzpicture}
]]>
</latex-image-code>
</image>
</figure>
<figure>
<caption>Pictures of spans in <m>\R^3</m>. The span of two noncollinear vectors is the plane containing the origin and the heads of the vectors. Note that three coplanar (but not collinear) vectors span a plane and not a 3-space, just as two collinear vectors span a line and not a plane.</caption>
<image>
<latex-image-code>
<![CDATA[
\begin{tikzpicture}[myxyz, thin border nodes, scale=.8]
\begin{scope}
\path[clip, resetxy] (-4,-3) rectangle (4,3);
\draw[seq4] ($-3*(-1,2,1)$) -- (0,0,0);
\begin{scope}[transformxy]
\fill[white, nearly opaque] (-2, -2) rectangle (3, 3);
\draw[grid lines] (-2, -2) grid (3, 3);
\end{scope}
\draw[seq4] (0,0,0) -- ($3*(-1,2,1)$);
\node[seq4] at (-1cm, 2cm) {$\Span\{v\}$};
\draw[vector, seq1] (0,0,0) to["$v$"] (-1,2,1);
\draw[thin, densely dotted] (-1,2,1) -- (-1,2,0);
\point at (0,0,0);
\end{scope}
\begin{scope}[xshift=9cm]
\path[clip, resetxy] (-4,-3) rectangle (4,3);
\def\v{(-1,2,1)}
\def\w{(1,2,.3)}
\node[coordinate] (X) at \v {};
\node[coordinate] (Y) at \w {};
\begin{scope}[x=(X), y=(Y), transformxy]
\path[clip] (-1.5, 5) -- (1.5, -5) -- (1.5, -7) -- (-1.5, -7) -- cycle;
\fill[seq4!30, nearly opaque] (-1.5,-1) rectangle (1.5,2);
\draw[step=.5cm, seq4, very thin] (-1.5,-1) grid (1.5,2);
\end{scope}
\begin{scope}[transformxy]
\fill[white, nearly opaque] (-2, -2) rectangle (3, 3);
\draw[grid lines] (-2, -2) grid (3, 3);
\end{scope}
\begin{scope}[x=(X), y=(Y), transformxy]
\path[clip] (-1.5, 5) -- (1.5, -5) -- (1.5, 7) -- (-1.5, 7) -- cycle;
\fill[seq4!30, nearly opaque] (-1.5,-1) rectangle (1.5,2);
\draw[step=.5cm, seq4, very thin] (-1.5,-1) grid (1.5,2);
\end{scope}
\node[seq4] at (-1cm, 2cm) {$\Span\{v,w\}$};
\draw[vector, seq1] (0,0,0) --
node [midway, above] {$v$} \v;
\draw[thin, densely dotted] \v -- \projxy\v;
\draw[vector, seq2] (0,0,0) --
node [midway, below] {\strut$w$} \w;
\draw[thin, densely dotted] \w -- \projxy\w;
\point at (0,0,0);
\end{scope}
\begin{scope}[yshift=-7cm]
\path[clip, resetxy] (-4,-3) rectangle (4,3);
\begin{scope}[transformxy]
\fill[white, nearly opaque] (-2, -2) rectangle (3, 3);
\draw[grid lines] (-2, -2) grid (3, 3);
\end{scope}
\draw[vector, seq1] (0,0,0) to["$v$"] (-1,2,1);
\draw[thin, densely dotted] (-1,2,1) -- (-1,2,0);
\draw[vector, seq2] (0,0,0) to["\strut$w$"'] (1,2,.3);
\draw[thin, densely dotted] (1,2,.3) -- (1,2,0);
\draw[vector, seq3] (0,0,0) to["$u$"] (.5,-.5,1);
\draw[thin, densely dotted] (.5,-.5,1) -- (.5,-.5,0);
\point at (0,0,0);
\fill[seq4!30, nearly transparent, resetxy] (-4,-3) rectangle (4,3);
\node[seq4] at (-1cm, 2cm) {$\Span\{u,v,w\}$};
\end{scope}
\begin{scope}[xshift=9cm, yshift=-7cm]
\path[clip, resetxy] (-4,-3) rectangle (4,3);
\def\v{(-1,2,1)}
\def\w{(1,2,.3)}
\def\u{(0,2,.65)}
\node[coordinate] (X) at \v {};
\node[coordinate] (Y) at \w {};
\begin{scope}[x=(X), y=(Y), transformxy]
\path[clip] (-1.5, 5) -- (1.5, -5) -- (1.5, -7) -- (-1.5, -7) -- cycle;
\fill[seq4!30, nearly opaque] (-1.5,-1) rectangle (1.5,2);
\draw[step=.5cm, seq4, very thin] (-1.5,-1) grid (1.5,2);
\end{scope}
\begin{scope}[transformxy]
\fill[white, nearly opaque] (-2, -2) rectangle (3, 3);
\draw[grid lines] (-2, -2) grid (3, 3);
\end{scope}
\begin{scope}[x=(X), y=(Y), transformxy]
\path[clip] (-1.5, 5) -- (1.5, -5) -- (1.5, 7) -- (-1.5, 7) -- cycle;
\fill[seq4!30, nearly opaque] (-1.5,-1) rectangle (1.5,2);
\draw[step=.5cm, seq4, very thin] (-1.5,-1) grid (1.5,2);
\end{scope}
\node[seq4] at (-1cm, 2cm) {$\Span\{u,v,w\}$};
\draw[vector, seq1] (0,0,0) --
node [midway, above] {$v$} \v;
\draw[thin, densely dotted] \v -- \projxy\v;
\draw[vector, seq2] (0,0,0) --
node [midway, below] {\strut$w$} \w;
\draw[thin, densely dotted] \w -- \projxy\w;
\draw[vector, seq3] (0,0,0) --
\u node [right] {$u$};
\draw[thin, densely dotted] \u -- \projxy\u;
\draw[thin, densely dotted] \v -- \w;
\point at (0,0,0);
\end{scope}
\end{tikzpicture}
]]>
</latex-image-code>
</image>
</figure>
<example hide-type="true">
<title>Interactive: Span of two vectors in <m>\R^2</m></title>
<figure>
<caption>Interactive picture of a span of two vectors in <m>\R^2</m>. Check <q>Show x.v + y.w</q> and move the sliders to see how every point in the violet region is in fact a linear combination of the two vectors.</caption>
<mathbox source="demos/spans.html?v1=1,2&amp;v2=1,0&amp;showPlane=true&amp;range=5&amp;labels=v,w" height="500px"/>
</figure>
</example>
<example hide-type="true">
<title>Interactive: Span of two vectors in <m>\R^3</m></title>
<figure>
<caption>Interactive picture of a span of two vectors in <m>\R^3</m>. Check <q>Show x.v + y.w</q> and move the sliders to see how every point in the violet region is in fact a linear combination of the two vectors.</caption>
<mathbox source="demos/spans.html?v1=3,2,4&amp;v2=-4,2,1&amp;labels=v,w" height="500px"/>
</figure>
</example>
<example hide-type="true">
<title>Interactive: Span of three vectors in <m>\R^3</m></title>
<figure>
<caption>Interactive picture of a span of three vectors in <m>\R^3</m>. Check <q>Show x.v + y.w + z.u</q> and move the sliders to see how every point in the violet region is in fact a linear combination of the three vectors.</caption>
<mathbox source="demos/spans.html?labels=v,w,u" height="500px"/>
</figure>
</example>
</paragraphs>
</subsection>
</section>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenglibo/gt-linalg.git
git@gitee.com:chenglibo/gt-linalg.git
chenglibo
gt-linalg
gt-linalg
master

搜索帮助