# fcla / src / section-LDS.xml

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 
Linear Dependence and Spans

In any linearly dependent set there is always one vector that can be written as a linear combination of the others. This is the substance of the upcoming . Perhaps this will explain the use of the word dependent. In a linearly dependent set, at least one vector depends on the others (via a linear combination).

Indeed, because is an equivalence () some authors use this condition as a definition () of linear dependence. Then linear independence is defined as the logical opposite of linear dependence. Of course, we have chosen to take as our definition, and then follow with as a theorem.

Linearly Dependent Sets and Spans

If we use a linearly dependent set to construct a span, then we can always create the same infinite set with a starting set that is one vector smaller in size. We will illustrate this behavior in . However, this will not be possible if we build a span from a linearly independent set. So in a certain sense, using a linearly independent set to formulate a span is the best possible way there aren't any extra vectors being used to build up all the necessary linear combinations. OK, here's the theorem, and then the example.

Dependency in Linearly Dependent Sets

Suppose that $S=\set{\vectorlist{u}{n}}$ is a set of vectors. Then $S$ is a linearly dependent set if and only if there is an index $t$, $1\leq t\leq n$ such that $\vect{u_t}$ is a linear combination of the vectors $\vect{u}_1,\,\vect{u}_2,\,\vect{u}_3,\,\ldots,\,\vect{u}_{t-1},\,\vect{u}_{t+1},\,\ldots,\,\vect{u}_n$.

Suppose that $S$ is linearly dependent, so there exists a nontrivial relation of linear dependence by . That is, there are scalars, $\alpha_i$, $1\leq i\leq n$, which are not all zero, such that \lincombo{\alpha}{u}{n}=\zerovector. Since the $\alpha_i$ cannot all be zero, choose one, say $\alpha_t$, that is nonzero. Then, \vect{u}_t \text{}\\ \frac{-1}{\alpha_t}\left( \alpha_1\vect{u}_1+ \cdots+ \alpha_{t-1}\vect{u}_{t-1}+ \alpha_{t+1}\vect{u}_{t+1}+ \cdots+ \alpha_n\vect{u}_n \text{}\\ \frac{-\alpha_1}{\alpha_t}\vect{u}_1+ \cdots+ \frac{-\alpha_{t-1}}{\alpha_t}\vect{u}_{t-1}+ \frac{-\alpha_{t+1}}{\alpha_t}\vect{u}_{t+1}+ \cdots+ \frac{-\alpha_n}{\alpha_t}\vect{u}_n \text{}

Since the values of $\frac{\alpha_i}{\alpha_t}$ are again scalars, we have expressed $\vect{u}_t$ as a linear combination of the other elements of $S$.

Assume that the vector $\vect{u}_t$ is a linear combination of the other vectors in $S$. Write this linear combination, denoting the relevant scalars as $\beta_1$, $\beta_2$, , $\beta_{t-1}$, $\beta_{t+1}$, , $\beta_n$, as \vect{u_t} \beta_1\vect{u}_1+ \beta_2\vect{u}_2+ \cdots+ \beta_{t-1}\vect{u}_{t-1}+ \beta_{t+1}\vect{u}_{t+1}+ \cdots+ \beta_n\vect{u}_n

Then we have \beta_1\vect{u}_1 \beta_{t-1}\vect{u}_{t-1}+ (-1)\vect{u}_t+ \beta_{t+1}\vect{u}_{t+1}+ \cdots+ \beta_n\vect{u}_n\\ \text{}\\ \text{}\\ \text{}\\ \text{}

So the scalars $\beta_1,\,\beta_2,\,\beta_3,\,\ldots,\,\beta_{t-1},\,\beta_t=-1,\beta_{t+1},\,\,\ldots,\,\beta_n$ provide a nontrivial linear combination of the vectors in $S$, thus establishing that $S$ is a linearly dependent set ().

This theorem can be used, sometimes repeatedly, to whittle down the size of a set of vectors used in a span construction. We have seen some of this already in , but in the next example we will detail some of the subtleties.

Reducing a span in $\complex{5}$

Consider the set of $n=4$ vectors from $\complex{5}$, R=\set{\vect{v}_1,\,\vect{v}_2,\,\vect{v}_3,\,\vect{v}_4} = \set{ \colvector{1\\2\\-1\\3\\2},\, \colvector{2\\1\\3\\1\\2},\, \colvector{0\\-7\\6\\-11\\-2},\, \colvector{4\\1\\2\\1\\6} }\\ and define $V=\spn{R}$.

To employ , we form a $5\times 4$ coefficient matrix, $D$, D= \begin{bmatrix} \end{bmatrix} and row-reduce to understand solutions to the homogeneous system $\homosystem{D}$, \begin{bmatrix} \end{bmatrix}

We can find infinitely many solutions to this system, most of them nontrivial, and we choose any one we like to build a relation of linear dependence on $R$. Let's begin with $x_4=1$, to find the solution \colvector{-4\\0\\-1\\1}

So we can write the relation of linear dependence, (-4)\vect{v}_1+0\vect{v}_2+(-1)\vect{v}_3+1\vect{v}_4=\zerovector

guarantees that we can solve this relation of linear dependence for some vector in $R$, but the choice of which one is up to us. Notice however that $\vect{v}_2$ has a zero coefficient. In this case, we cannot choose to solve for $\vect{v}_2$. Maybe some other relation of linear dependence would produce a nonzero coefficient for $\vect{v}_2$ if we just had to solve for this vector. Unfortunately, this example has been engineered to always produce a zero coefficient here, as you can see from solving the homogeneous system. Every solution has $x_2=0$!

OK, if we are convinced that we cannot solve for $\vect{v}_2$, let's instead solve for $\vect{v}_3$, \vect{v}_3=(-4)\vect{v}_1+0\vect{v}_2+1\vect{v}_4=(-4)\vect{v}_1+1\vect{v}_4

We now claim that this particular equation will allow us to write V=\spn{R}= \spn{\set{\vect{v}_1,\,\vect{v}_2,\,\vect{v}_3,\,\vect{v}_4}}= \spn{\set{\vect{v}_1,\,\vect{v}_2,\,\vect{v}_4}} in essence declaring $\vect{v}_3$ as surplus for the task of building $V$ as a span. This claim is an equality of two sets, so we will use to establish it carefully. Let $R^\prime=\set{\vect{v}_1,\,\vect{v}_2,\,\vect{v}_4}$ and $V^\prime=\spn{R^\prime}$. We want to show that $V=V^\prime$.

First show that $V^\prime\subseteq V$. Since every vector of $R^\prime$ is in $R$, any vector we can construct in $V^\prime$ as a linear combination of vectors from $R^\prime$ can also be constructed as a vector in $V$ by the same linear combination of the same vectors in $R$. That was easy, now turn it around.

Next show that $V\subseteq V^\prime$. Choose any $\vect{v}$ from $V$. Then there are scalars $\alpha_1,\,\alpha_2,\,\alpha_3,\,\alpha_4$ so that \alpha_1\vect{v}_1+\alpha_2\vect{v}_2+\alpha_3\vect{v}_3+\alpha_4\vect{v}_4\\ \alpha_3\left((-4)\vect{v}_1+1\vect{v}_4\right)+ \alpha_4\vect{v}_4\\ \left((-4\alpha_3)\vect{v}_1+\alpha_3\vect{v}_4\right)+ \alpha_4\vect{v}_4\\ \alpha_2\vect{v}_2+ \left(\alpha_3+\alpha_4\right)\vect{v}_4.

This equation says that $\vect{v}$ can then be written as a linear combination of the vectors in $R^\prime$ and hence qualifies for membership in $V^\prime$. So $V\subseteq V^\prime$ and we have established that $V=V^\prime$.

If $R^\prime$ was also linearly dependent (it is not), we could reduce the set even further. Notice that we could have chosen to eliminate any one of $\vect{v}_1$, $\vect{v}_3$ or $\vect{v}_4$, but somehow $\vect{v}_2$ is essential to the creation of $V$ since it cannot be replaced by any linear combination of $\vect{v}_1$, $\vect{v}_3$ or $\vect{v}_4$.

Relations of Linear Dependence turned on a non-trivial relation of linear dependence () on the set $\set{\vect{v}_1,\,\vect{v}_2,\,\vect{v}_3,\,\vect{v}_4}$. Besides indicating linear independence, the Sage vector space method .linear_dependence() produces relations of linear dependence for linearly dependent sets. Here is how we would employ this method in . The optional argument zeros='right' will produce results consistent with our work here, you can also experiment with zeros='left' (which is the default). V = QQ^5 v1 = vector(QQ, [1, 2, -1, 3, 2]) v2 = vector(QQ, [2, 1, 3, 1, 2]) v3 = vector(QQ, [0, -7, 6, -11, -2]) v4 = vector(QQ, [4, 1, 2, 1, 6]) R = [v1, v2, v3, v4] L = V.linear_dependence(R, zeros='right') L[0] (-4, 0, -1, 1) -4*v1 + 0*v2 +(-1)*v3 +1*v4 (0, 0, 0, 0, 0) V.span(R) == V.span([v1, v2, v4]) True You can check that the list L has just one element (maybe with len(L)), but realize that any multiple of the vector L[0] is also a relation of linear dependence on R, most of which are non-trivial. Notice that we have verified the final conclusion of with a comparison of two spans.

We will give the .linear_dependence() method a real workout in the nest Sage subsection () this is just a quick introduction.
Casting Out Vectors

In we used four vectors to create a span. With a relation of linear dependence in hand, we were able to toss out one of these four vectors and create the same span from a subset of just three vectors from the original set of four. We did have to take some care as to just which vector we tossed out. In the next example, we will be more methodical about just how we choose to eliminate vectors from a linearly dependent set while preserving a span.

Casting out vectors

We begin with a set $S$ containing seven vectors from $\complex{4}$, S=\set{ \colvector{1\\2\\0\\-1},\, \colvector{4\\8\\0\\-4},\, \colvector{0\\-1\\2\\2},\, \colvector{-1\\3\\-3\\4},\, \colvector{0\\9\\-4\\8},\, \colvector{7\\-13\\12\\-31},\, \colvector{-9\\7\\-8\\37} } and define $W=\spn{S}$.

The set $S$ is obviously linearly dependent by , since we have $n=7$ vectors from $\complex{4}$. So we can slim down $S$ some, and still create $W$ as the span of a smaller set of vectors.

As a device for identifying relations of linear dependence among the vectors of $S$, we place the seven column vectors of $S$ into a matrix as columns, A=\matrixcolumns{A}{7}=

By a nontrivial solution to $\homosystem{A}$ will give us a nontrivial relation of linear dependence () on the columns of $A$ (which are the elements of the set $S$). The row-reduced form for $A$ is the matrix B= so we can easily create solutions to the homogeneous system $\homosystem{A}$ using the free variables $x_2,\,x_5,\,x_6,\,x_7$. Any such solution will correspond to a relation of linear dependence on the columns of $B$. These solutions will allow us to solve for one column vector as a linear combination of some others, in the spirit of , and remove that vector from the set. We'll set about forming these linear combinations methodically.

Set the free variable $x_2$ to one, and set the other free variables to zero. Then a solution to $\linearsystem{A}{\zerovector}$ is \vect{x}=\colvector{-4\\1\\0\\0\\0\\0\\0} which can be used to create the linear combination (-4)\vect{A}_1+ 1\vect{A}_2+ 0\vect{A}_3+ 0\vect{A}_4+ 0\vect{A}_5+ 0\vect{A}_6+ 0\vect{A}_7 =\zerovector

This can then be arranged and solved for $\vect{A}_2$, resulting in $\vect{A}_2$ expressed as a linear combination of $\set{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4}$, \vect{A}_2= 4\vect{A}_1+ 0\vect{A}_3+ 0\vect{A}_4

This means that $\vect{A}_2$ is surplus, and we can create $W$ just as well with a smaller set with this vector removed, W=\spn{\set{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4,\,\vect{A}_5,\,\vect{A}_6,\,\vect{A}_7}}

Technically, this set equality for $W$ requires a proof, in the spirit of , but we will bypass this requirement here, and in the next few paragraphs.

Now, set the free variable $x_5$ to one, and set the other free variables to zero. Then a solution to $\linearsystem{B}{\zerovector}$ is \vect{x}=\colvector{-2\\0\\-1\\-2\\1\\0\\0} which can be used to create the linear combination (-2)\vect{A}_1+ 0\vect{A}_2+ (-1)\vect{A}_3+ (-2)\vect{A}_4+ 1\vect{A}_5+ 0\vect{A}_6+ 0\vect{A}_7 =\zerovector

This can then be arranged and solved for $\vect{A}_5$, resulting in $\vect{A}_5$ expressed as a linear combination of $\set{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4}$, \vect{A}_5= 2\vect{A}_1+ 1\vect{A}_3+ 2\vect{A}_4

This means that $\vect{A}_5$ is surplus, and we can create $W$ just as well with a smaller set with this vector removed, W=\spn{\left\{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4,\,\vect{A}_6,\,\vect{A}_7\right\}}

Do it again, set the free variable $x_6$ to one, and set the other free variables to zero. Then a solution to $\linearsystem{B}{\zerovector}$ is \vect{x}=\colvector{-1\\0\\3\\6\\0\\1\\0} which can be used to create the linear combination (-1)\vect{A}_1+ 0\vect{A}_2+ 3\vect{A}_3+ 6\vect{A}_4+ 0\vect{A}_5+ 1\vect{A}_6+ 0\vect{A}_7 =\zerovector

This can then be arranged and solved for $\vect{A}_6$, resulting in $\vect{A}_6$ expressed as a linear combination of $\set{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4}$, \vect{A}_6= 1\vect{A}_1+ (-3)\vect{A}_3+ (-6)\vect{A}_4 This means that $\vect{A}_6$ is surplus, and we can create $W$ just as well with a smaller set with this vector removed, W=\spn{\set{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4,\,\vect{A}_7}}

Set the free variable $x_7$ to one, and set the other free variables to zero. Then a solution to $\linearsystem{B}{\zerovector}$ is \vect{x}=\colvector{3\\0\\-5\\-6\\0\\0\\1} which can be used to create the linear combination 3\vect{A}_1+ 0\vect{A}_2+ (-5)\vect{A}_3+ (-6)\vect{A}_4+ 0\vect{A}_5+ 0\vect{A}_6+ 1\vect{A}_7 =\zerovector

This can then be arranged and solved for $\vect{A}_7$, resulting in $\vect{A}_7$ expressed as a linear combination of $\set{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4}$, \vect{A}_7= (-3)\vect{A}_1+ 5\vect{A}_3+ 6\vect{A}_4

This means that $\vect{A}_7$ is surplus, and we can create $W$ just as well with a smaller set with this vector removed, W=\spn{\set{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4}}

You might think we could keep this up, but we have run out of free variables. And not coincidentally, the set $\set{\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4}$ is linearly independent (check this!). It should be clear how each free variable was used to eliminate the corresponding column from the set used to span the column space, as this will be the essence of the proof of the next theorem. The column vectors in $S$ were not chosen entirely at random, they are the columns of . See if you can mimic this example using the columns of . Go ahead, we'll go grab a cup of coffee and be back before you finish up.

For extra credit, notice that the vector \vect{b}=\colvector{3\\9\\1\\4} is the vector of constants in the definition of . Since the system $\linearsystem{A}{\vect{b}}$ is consistent, we know by that $\vect{b}$ is a linear combination of the columns of $A$, or stated equivalently, $\vect{b}\in W$. This means that $\vect{b}$ must also be a linear combination of just the three columns $\vect{A}_1,\,\vect{A}_3,\,\vect{A}_4$. Can you find such a linear combination? Did you notice that there is just a single (unique) answer? Hmmmm.

Casting Out Vectors We will redo , though somewhat tersely, just producing the justification for each time we toss a vector (a specific relation of linear dependence), and then verifying that the resulting spans, each with one fewer vector, still produce the original span. We also introduce the .remove() method for lists. Ready? Here we go. V = QQ^4 v1 = vector(QQ, [ 1, 2, 0, -1]) v2 = vector(QQ, [ 4, 8, 0, -4]) v3 = vector(QQ, [ 0, -1, 2, 2]) v4 = vector(QQ, [-1, 3, -3, 4]) v5 = vector(QQ, [ 0, 9, -4, 8]) v6 = vector(QQ, [ 7, -13, 12, -31]) v7 = vector(QQ, [-9, 7, -8, 37]) S = [v1, v2, v3, v4, v5, v6, v7] W = V.span(S) D = V.linear_dependence(S, zeros='right') D [ (-4, 1, 0, 0, 0, 0, 0), (-2, 0, -1, -2, 1, 0, 0), (-1, 0, 3, 6, 0, 1, 0), (3, 0, -5, -6, 0, 0, 1) ] D[0] (-4, 1, 0, 0, 0, 0, 0) S.remove(v2) W == V.span(S) True D[1] (-2, 0, -1, -2, 1, 0, 0) S.remove(v5) W == V.span(S) True D[2] (-1, 0, 3, 6, 0, 1, 0) S.remove(v6) W == V.span(S) True D[3] (3, 0, -5, -6, 0, 0, 1) S.remove(v7) W == V.span(S) True S [(1, 2, 0, -1), (0, -1, 2, 2), (-1, 3, -3, 4)] S == [v1, v3, v4] True Notice that S begins with all seven original vectors, and slowly gets whittled down to just the list [v1, v3, v4]. If you experiment with the above commands, be sure to return to the start and work your way through in order, or the results will not be right.

As a bonus, notice that the set of relations of linear dependence provided by Sage, D, is itself a linearly independent set (but within a very different vector space). Is that too weird? U = QQ^7 U.linear_dependence(D) == [] True Now, can you answer the extra credit question from using Sage?

deserves your careful attention, since this important example motivates the following very fundamental theorem.

Basis of a Span

Suppose that $S=\set{\vectorlist{v}{n}}$ is a set of column vectors. Define $W=\spn{S}$ and let $A$ be the matrix whose columns are the vectors from $S$. Let $B$ be the reduced row-echelon form of $A$, with $D=\set{\scalarlist{d}{r}}$ the set of column indices corresponding to the pivot columns of $B$. Then

1. $T=\set{\vect{v}_{d_1},\,\vect{v}_{d_2},\,\vect{v}_{d_3},\,\ldots\,\vect{v}_{d_r}}$ is a linearly independent set.
2. $W=\spn{T}$.

To prove that $T$ is linearly independent, begin with a relation of linear dependence on $T$, \zerovector= \alpha_1\vect{v}_{d_1}+\alpha_2\vect{v}_{d_2}+\alpha_3\vect{v}_{d_3}+\ldots+\alpha_r\vect{v}_{d_r} and we will try to conclude that the only possibility for the scalars $\alpha_i$ is that they are all zero. Denote the non-pivot columns of $B$ by $F=\set{\scalarlist{f}{n-r}}$. Then we can preserve the equality by adding a big fat zero to the linear combination, \zerovector= \alpha_1\vect{v}_{d_1}+\alpha_2\vect{v}_{d_2}+\alpha_3\vect{v}_{d_3}+\ldots+\alpha_r\vect{v}_{d_r}+ 0\vect{v}_{f_1}+0\vect{v}_{f_2}+0\vect{v}_{f_3}+\ldots+0\vect{v}_{f_{n-r}}

By , the scalars in this linear combination (suitably reordered) are a solution to the homogeneous system $\homosystem{A}$. But notice that this is the solution obtained by setting each free variable to zero. If we consider the description of a solution vector in the conclusion of , in the case of a homogeneous system, then we see that if all the free variables are set to zero the resulting solution vector is trivial (all zeros). So it must be that $\alpha_i=0$, $1\leq i\leq r$. This implies by that $T$ is a linearly independent set.

The second conclusion of this theorem is an equality of sets (). Since $T$ is a subset of $S$, any linear combination of elements of the set $T$ can also be viewed as a linear combination of elements of the set $S$. So $\spn{T}\subseteq\spn{S}=W$. It remains to prove that $W=\spn{S}\subseteq\spn{T}$.

For each $k$, $1\leq k\leq n-r$, form a solution $\vect{x}$ to $\homosystem{A}$ by setting the free variables as follows:

By , the remainder of this solution vector is given by,

From this solution, we obtain a relation of linear dependence on the columns of $A$, -\matrixentry{B}{1,f_k}\vect{v}_{d_1} -\matrixentry{B}{2,f_k}\vect{v}_{d_2} -\matrixentry{B}{3,f_k}\vect{v}_{d_3} -\ldots -\matrixentry{B}{r,f_k}\vect{v}_{d_r} +1\vect{v}_{f_k} =\zerovector which can be arranged as the equality \vect{v}_{f_k}= \matrixentry{B}{1,f_k}\vect{v}_{d_1}+ \matrixentry{B}{2,f_k}\vect{v}_{d_2}+ \matrixentry{B}{3,f_k}\vect{v}_{d_3}+ \ldots+ \matrixentry{B}{r,f_k}\vect{v}_{d_r}

Now, suppose we take an arbitrary element, $\vect{w}$, of $W=\spn{S}$ and write it as a linear combination of the elements of $S$, but with the terms organized according to the indices in $D$ and $F$, \alpha_1\vect{v}_{d_1}+ \alpha_2\vect{v}_{d_2}+ \ldots+ \alpha_r\vect{v}_{d_r}+ \beta_1\vect{v}_{f_1}+ \beta_2\vect{v}_{f_2}+ \ldots+ \beta_{n-r}\vect{v}_{f_{n-r}}

From the above, we can replace each $\vect{v}_{f_j}$ by a linear combination of the $\vect{v}_{d_i}$, \alpha_1\vect{v}_{d_1}+ \alpha_2\vect{v}_{d_2}+ \ldots+ \alpha_r\vect{v}_{d_r}+\\ \matrixentry{B}{1,f_1}\vect{v}_{d_1}+ \matrixentry{B}{2,f_1}\vect{v}_{d_2}+ \matrixentry{B}{3,f_1}\vect{v}_{d_3}+ \ldots+ \matrixentry{B}{r,f_1}\vect{v}_{d_r} \right)+\\ \matrixentry{B}{1,f_2}\vect{v}_{d_1}+ \matrixentry{B}{2,f_2}\vect{v}_{d_2}+ \matrixentry{B}{3,f_2}\vect{v}_{d_3}+ \ldots+ \matrixentry{B}{r,f_2}\vect{v}_{d_r} \right)+\\ \matrixentry{B}{1,f_{n-r}}\vect{v}_{d_1}+ \matrixentry{B}{2,f_{n-r}}\vect{v}_{d_2}+ \matrixentry{B}{3,f_{n-r}}\vect{v}_{d_3}+ \ldots+ \matrixentry{B}{r,f_{n-r}}\vect{v}_{d_r} \right)\\ With repeated applications of several of the properties of we can rearrange this expression as, \alpha_1+ \beta_1\matrixentry{B}{1,f_1}+ \beta_2\matrixentry{B}{1,f_2}+ \beta_3\matrixentry{B}{1,f_3}+ \ldots+ \beta_{n-r}\matrixentry{B}{1,f_{n-r}} \right)\vect{v}_{d_1}+\\ \beta_1\matrixentry{B}{2,f_1}+ \beta_2\matrixentry{B}{2,f_2}+ \beta_3\matrixentry{B}{2,f_3}+ \ldots+ \beta_{n-r}\matrixentry{B}{2,f_{n-r}} \right)\vect{v}_{d_2}+\\ \beta_1\matrixentry{B}{r,f_1}+ \beta_2\matrixentry{B}{r,f_2}+ \beta_3\matrixentry{B}{r,f_3}+ \ldots+\beta_{n-r}\matrixentry{B}{r,f_{n-r}} \right)\vect{v}_{d_r} This mess expresses the vector $\vect{w}$ as a linear combination of the vectors in T=\set{\vect{v}_{d_1},\,\vect{v}_{d_2},\,\vect{v}_{d_3},\,\ldots\,\vect{v}_{d_r}} thus saying that $\vect{w}\in\spn{T}$. Therefore, $W=\spn{S}\subseteq\spn{T}$.

In , we tossed-out vectors one at a time. But in each instance, we rewrote the offending vector as a linear combination of those vectors that corresponded to the pivot columns of the reduced row-echelon form of the matrix of columns. In the proof of , we accomplish this reduction in one big step. In we arrived at a linearly independent set at exactly the same moment that we ran out of free variables to exploit. This was not a coincidence, it is the substance of our conclusion of linear independence in .

Here's a straightforward application of .

Reducing a span in $\complex{4}$

Begin with a set of five vectors from $\complex{4}$, S=\set{ \colvector{ 1 \\ 1 \\ 2 \\ 1},\, \colvector{ 2 \\ 2 \\ 4 \\ 2},\, \colvector{ 2 \\ 0 \\ -1 \\ 1},\, \colvector{ 7 \\ 1 \\ -1 \\ 4},\, \colvector{ 0 \\ 2 \\ 5 \\ 1} } and let $W=\spn{S}$. To arrive at a (smaller) linearly independent set, follow the procedure described in . Place the vectors from $S$ into a matrix as columns, and row-reduce, \begin{bmatrix} \end{bmatrix} \rref \begin{bmatrix} \end{bmatrix}

Columns 1 and 3 are the pivot columns ($D=\set{1,\,3}$) so the set T=\set{ \colvector{ 1 \\ 1 \\ 2 \\ 1},\, \colvector{ 2 \\ 0 \\ -1 \\ 1} } is linearly independent and $\spn{T}=\spn{S}=W$. Boom!

Since the reduced row-echelon form of a matrix is unique (), the procedure of leads us to a unique set $T$. However, there is a wide variety of possibilities for sets $T$ that are linearly independent and which can be employed in a span to create $W$. Without proof, we list two other possibilities: \colvector{ 2 \\ 2 \\ 4 \\ 2},\, \colvector{ 2 \\ 0 \\ -1 \\ 1} }\\ \colvector{3 \\ 1 \\ 1 \\ 2},\, \colvector{-1 \\ 1 \\ 3 \\ 0} }

Can you prove that $T^{\prime}$ and $T^{*}$ are linearly independent sets and $W=\spn{S}=\spn{T^{\prime}}=\spn{T^{*}}$?

Reducing a Span allows us to construct a reduced spanning set for a span. As with the theorem, employing Sage we begin by constructing a matrix with the vectors of the spanning set as columns. Here is a do-over of , illustrating the use of in Sage. V = QQ^4 v1 = vector(QQ, [1,1,2,1]) v2 = vector(QQ, [2,2,4,2]) v3 = vector(QQ, [2,0,-1,1]) v4 = vector(QQ, [7,1,-1,4]) v5 = vector(QQ, [0,2,5,1]) S = [v1, v2, v3, v4, v5] A = column_matrix(S) T = [A.column(p) for p in A.pivots()] T [(1, 1, 2, 1), (2, 0, -1, 1)] V.linear_dependence(T) == [] True V.span(S) == V.span(T) True Notice how we compute T with the single line that mirrors the construction of the set $T=\set{\vect{v}_{d_1},\,\vect{v}_{d_2},\,\vect{v}_{d_3},\,\ldots\,\vect{v}_{d_r}}$ in the statement of . Again, the row-reducing is hidden in the use of the .pivot() matrix method, which necessarily must compute the reduced row-echelon form. The final two compute cells verify both conclusions of the theorem. Reworking elements of a span

Begin with a set of five vectors from $\complex{4}$, R=\set{ \colvector{ 2 \\ 1 \\ 3 \\ 2 },\, \colvector{ -1 \\ 1 \\ 0 \\ 1 },\, \colvector{ -8 \\ -1 \\ -9 \\ -4 },\, \colvector{ 3 \\ 1 \\ -1 \\ -2 },\, \colvector{ -10 \\ -1 \\ -1 \\ 4} }

It is easy to create elements of $X=\spn{R}$ we will create one at random, \vect{y}= 6\colvector{ 2 \\ 1 \\ 3 \\ 2 }+ (-7)\colvector{ -1 \\ 1 \\ 0 \\ 1 }+ 1\colvector{ -8 \\ -1 \\ -9 \\ -4 }+ 6\colvector{ 3 \\ 1 \\ -1 \\ -2 }+ 2\colvector{ -10 \\ -1 \\ -1 \\ 4} = \colvector{9\\2\\1\\-3}

We know we can replace $R$ by a smaller set (since it is obviously linearly dependent by ) that will create the same span. Here goes, \begin{bmatrix} \end{bmatrix} \rref \begin{bmatrix} \end{bmatrix}

So, if we collect the first, second and fourth vectors from $R$, P=\set{ \colvector{ 2 \\ 1 \\ 3 \\ 2 },\, \colvector{ -1 \\ 1 \\ 0 \\ 1 },\, \colvector{ 3 \\ 1 \\ -1 \\ -2 } } then $P$ is linearly independent and $\spn{P}=\spn{R}=X$ by . Since we built $\vect{y}$ as an element of $\spn{R}$ it must also be an element of $\spn{P}$. Can we write $\vect{y}$ as a linear combination of just the three vectors in $P$? The answer is, of course, yes. But let's compute an explicit linear combination just for fun. By we can get such a linear combination by solving a system of equations with the column vectors of $R$ as the columns of a coefficient matrix, and $\vect{y}$ as the vector of constants.

Employing an augmented matrix to solve this system, \begin{bmatrix} \end{bmatrix} \rref \begin{bmatrix} \end{bmatrix}

So we see, as expected, that 1\colvector{ 2 \\ 1 \\ 3 \\ 2 }+ (-1)\colvector{ -1 \\ 1 \\ 0 \\ 1 }+ 2\colvector{ 3 \\ 1 \\ -1 \\ -2 } =\colvector{9 \\ 2 \\ 1 \\ -3} =\vect{y}

A key feature of this example is that the linear combination that expresses $\vect{y}$ as a linear combination of the vectors in $P$ is unique. This is a consequence of the linear independence of $P$. The linearly independent set $P$ is smaller than $R$, but still just (barely) big enough to create elements of the set $X=\spn{R}$. There are many, many ways to write $\vect{y}$ as a linear combination of the five vectors in $R$ (the appropriate system of equations to verify this claim has two free variables in the description of the solution set), yet there is precisely one way to write $\vect{y}$ as a linear combination of the three vectors in $P$.

Reworking a Span As another demonstration of using Sage to help us understand spans, linear combinations, linear independence and reduced row-echelon form, we will recreate parts of . Most of this should be familiar, but see the commments following. V = QQ^4 v1 = vector(QQ, [2,1,3,2]) v2 = vector(QQ, [-1,1,0,1]) v3 = vector(QQ, [-8,-1,-9,-4]) v4 = vector(QQ, [3,1,-1,-2]) v5 = vector(QQ, [-10,-1,-1,4]) y = 6*v1 - 7*v2 + v3 +6*v4 + 2*v5 y (9, 2, 1, -3) R = [v1, v2, v3, v4, v5] X = V.span(R) y in X True A = column_matrix(R) P = [A.column(p) for p in A.pivots()] W = V.span(P) W == X True y in W True coeff = column_matrix(P) coeff.solve_right(y) (1, -1, 2) coeff.right_kernel() Vector space of degree 3 and dimension 0 over Rational Field Basis matrix: [] V.linear_dependence(P) == [] True The final two results a trivial null space for coeff and the linear independence of P both individually imply that the solution to the system of equations (just prior) is unique. Sage produces its own linearly independent spanning set for each span, as we see whenever we inquire about a span. X Vector space of degree 4 and dimension 3 over Rational Field Basis matrix: [ 1 0 0 -8/15] [ 0 1 0 7/15] [ 0 0 1 13/15] Can you extract the three vectors that Sage uses to span X and solve the appropriate system of equations to see how to write y as a linear combination of these three vectors? Once you have done that, check your answer by hand and think about how using Sage could have been overkill for this question.
1. Let $S$ be the linearly dependent set of three vectors below. S=\set{\colvector{1\\10\\100\\1000},\,\colvector{1\\1\\1\\1},\,\colvector{5\\23\\203\\2003}} Write one vector from $S$ as a linear combination of the other two and include this vector equality in your response. (You should be able to do this on sight, rather than doing some computations.) Convert this expression into a nontrivial relation of linear dependence on $S$.
2. Explain why the word dependent is used in the definition of linear dependence.
3. Suppose that $Y=\spn{P}=\spn{Q}$, where $P$ is a linearly dependent set and $Q$ is linearly independent. Would you rather use $P$ or $Q$ to describe $Y$? Why?
Let $T$ be the set of columns of the matrix $B$ below. Define $W=\spn{T}$. Find a set $R$ so that (1) $R$ has 3 vectors, (2) $R$ is a subset of $T$, and (3) $W=\spn{R}$. B= \begin{bmatrix} \end{bmatrix} Let $T=\set{\vect{w}_1,\,\vect{w}_2,\,\vect{w}_3,\,\vect{w}_4}$. The vector $\colvector{2\\-1\\0\\1}$ is a solution to the homogeneous system with the matrix $B$ as the coefficient matrix (check this!). By it provides the scalars for a linear combination of the columns of $B$ (the vectors in $T$) that equals the zero vector, a relation of linear dependence on $T$, 2\vect{w}_1+(-1)\vect{w}_2+(1)\vect{w}_4=\zerovector We can rearrange this equation by solving for $\vect{w}_4$, \vect{w}_4=(-2)\vect{w}_1+\vect{w}_2 This equation tells us that the vector $\vect{w}_4$ is superfluous in the span construction that creates $W$. So $W=\spn{\set{\vect{w}_1,\,\vect{w}_2,\,\vect{w}_3}}$. The requested set is $R=\set{\vect{w}_1,\,\vect{w}_2,\,\vect{w}_3}$. Verify that the set $R^\prime=\set{\vect{v}_1,\,\vect{v}_2,\,\vect{v}_4}$ at the end of is linearly independent. Consider the set of vectors from $\complex{3}$, $W$, given below. Find a linearly independent set $T$ that contains three vectors from $W$ and such that $\spn{W}=\spn{T}$. W= \set{\vect{v}_1,\,\vect{v}_2,\,\vect{v}_3,\,\vect{v}_4,\,\vect{v}_5} =\set{ \colvector{2\\1\\1},\, \colvector{-1\\-1\\1},\, \colvector{1\\2\\3},\, \colvector{3\\1\\3},\, \colvector{0\\1\\-3} } To apply , we formulate a matrix $A$ whose columns are $\vect{v}_1,\,\vect{v}_2,\,\vect{v}_3,\,\vect{v}_4,\,\vect{v}_5$. Then we row-reduce $A$. After row-reducing, we obtain \begin{bmatrix} \end{bmatrix} From this we see that the pivot columns are $D=\set{1,\,2,\,3}$. Thus T=\set{\vect{v}_1,\,\vect{v}_2,\,\vect{v}_3}=\set{\colvector{2\\1\\1},\,\colvector{-1\\-1\\1},\,\colvector{1\\2\\3}} is a linearly independent set and $\spn{T}=W$. Compare this problem with . Given the set $S$ below, find a linearly independent set $T$ so that $\spn{T}=\spn{S}$. S=\set{ \colvector{2\\-1\\2},\, \colvector{3\\0\\1},\, \colvector{1\\1\\-1},\, \colvector{5\\-1\\3} } says we can make a matrix with these four vectors as columns, row-reduce, and just keep the columns with indices in the set $D$. Here we go, forming the relevant matrix and row-reducing, \begin{bmatrix} \end{bmatrix} \rref \begin{bmatrix} \end{bmatrix} Analyzing the row-reduced version of this matrix, we see that the first two columns are pivot columns, so $D=\set{1,2}$. says we need only keep the first two columns to create a set with the requisite properties, T=\set{ \colvector{2\\-1\\2},\, \colvector{3\\0\\1} } Let $W$ be the span of the set of vectors $S$ below, $W=\spn{S}$. Find a set $T$ so that 1) the span of $T$ is $W$, $\spn{T}=W$, (2) $T$ is a linearly independent set, and (3) $T$ is a subset of $S$. \set{ \colvector{1 \\ 2 \\ -1},\, \colvector{2 \\ -3 \\ 1},\, \colvector{4 \\ 1 \\ -1},\, \colvector{3 \\ 1 \\ 1},\, \colvector{3 \\ -1 \\ 0} } This is a straight setup for the conclusion of . The hypotheses of this theorem tell us to pack the vectors of $W$ into the columns of a matrix and row-reduce, \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} Pivot columns have indices $D=\set{1,\,2,\,4}$. tells us to form $T$ with columns $1,\,2$ and $4$ of $S$, \set{ \colvector{1 \\ 2 \\ -1},\, \colvector{2 \\ -3 \\ 1},\, \colvector{3 \\ 1 \\ 1} } Let $T$ be the set of vectors $T=\set{ \colvector{1 \\ -1 \\ 2},\, \colvector{3 \\ 0 \\ 1},\, \colvector{4 \\ 2 \\ 3},\, \colvector{3 \\ 0 \\ 6} }$. Find two different subsets of $T$, named $R$ and $S$, so that $R$ and $S$ each contain three vectors, and so that $\spn{R}=\spn{T}$ and $\spn{S}=\spn{T}$. Prove that both $R$ and $S$ are linearly independent. Let $A$ be the matrix whose columns are the vectors in $T$. Then row-reduce $A$, A\rref B= \begin{bmatrix} \end{bmatrix} From we can form $R$ by choosing the columns of $A$ that correspond to the pivot columns of $B$. also guarantees that $R$ will be linearly independent. R=\set{ \colvector{1 \\ -1 \\ 2},\, \colvector{3 \\ 0 \\ 1},\, \colvector{4 \\ 2 \\ 3} } That was easy. To find $S$ will require a bit more work. From $B$ we can obtain a solution to $\homosystem{A}$, which by will provide a nontrivial relation of linear dependence on the columns of $A$, which are the vectors in $T$. To wit, choose the free variable $x_4$ to be 1, then $x_1=-2$, $x_2=1$, $x_3=-1$, and so (-2)\colvector{1 \\ -1 \\ 2}+ (1)\colvector{3 \\ 0 \\ 1}+ (-1)\colvector{4 \\ 2 \\ 3}+ (1)\colvector{3 \\ 0 \\ 6} = \colvector{0\\0\\0} this equation can be rewritten with the second vector staying put, and the other three moving to the other side of the equality, \colvector{3 \\ 0 \\ 1} = (2)\colvector{1 \\ -1 \\ 2}+ (1)\colvector{4 \\ 2 \\ 3}+ (-1)\colvector{3 \\ 0 \\ 6} We could have chosen other vectors to stay put, but may have then needed to divide by a nonzero scalar. This equation is enough to conclude that the second vector in $T$ is surplus and can be replaced (see the careful argument in ). So set S=\set{ \colvector{1 \\ -1 \\ 2},\, \colvector{4 \\ 2 \\ 3},\, \colvector{3 \\ 0 \\ 6} } and then $\spn{S}=\spn{T}$. $T$ is also a linearly independent set, which we can show directly. Make a matrix $C$ whose columns are the vectors in $S$. Row-reduce $B$ and you will obtain the identity matrix $I_3$. By , the set $S$ is linearly independent. Reprise by creating a new version of the vector $\vect{y}$. In other words, form a new, different linear combination of the vectors in $R$ to create a new vector $\vect{y}$ (but do not simplify the problem too much by choosing any of the five new scalars to be zero). Then express this new $\vect{y}$ as a combination of the vectors in $P$. At the conclusion of two alternative solutions, sets $T^{\prime}$ and $T^{*}$, are proposed. Verify these claims by proving that $\spn{T}=\spn{T^{\prime}}$ and $\spn{T}=\spn{T^{*}}$. Suppose that $\vect{v}_1$ and $\vect{v}_2$ are any two vectors from $\complex{m}$. Prove the following set equality. \spn{\set{\vect{v}_1,\,\vect{v}_2}} = \spn{\set{\vect{v}_1+\vect{v}_2,\,\vect{v}_1-\vect{v}_2}} This is an equality of sets, so applies.

The easy half first. Show that $X=\spn{\set{\vect{v}_1+\vect{v}_2,\,\vect{v}_1-\vect{v}_2}}\subseteq \spn{\set{\vect{v}_1,\,\vect{v}_2}}=Y$.\\ Choose $\vect{x}\in X$. Then $\vect{x}=a_1(\vect{v}_1+\vect{v}_2)+a_2(\vect{v}_1-\vect{v}_2)$ for some scalars $a_1$ and $a_2$. Then, \vect{x} which qualifies $\vect{x}$ for membership in $Y$, as it is a linear combination of $\vect{v}_1,\,\vect{v}_2$.

Now show the opposite inclusion, $Y=\spn{\set{\vect{v}_1,\,\vect{v}_2}}\subseteq\spn{\set{\vect{v}_1+\vect{v}_2,\,\vect{v}_1-\vect{v}_2}}=X$.\\ Choose $\vect{y}\in Y$. Then there are scalars $b_1,\,b_2$ such that $\vect{y}=b_1\vect{v}_1+b_2\vect{v}_2$. Rearranging, we obtain, \vect{y} + \frac{b_2}{2}\left[\left(\vect{v}_1+\vect{v}_2\right)-\left(\vect{v}_1-\vect{v}_2\right)\right]\\ This is an expression for $\vect{y}$ as a linear combination of $\vect{v}_1+\vect{v}_2$ and $\vect{v}_1-\vect{v}_2$, earning $\vect{y}$ membership in $X$. Since $X$ is a subset of $Y$, and vice versa, we see that $X=Y$, as desired.