Section 2.1

Independence and Dimension

> with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

>

Definition of Independence

**************************************************************

A set of vectors v[1] , v[2] , v[3] ,....., v[n] of a vector space V is linearly dependent if there

exists scalars c[1] , c[2] , c[3] ,...., c[n] not all zero such that

c[1] v[1] + c[2] v[2] + c[3] v[3] + ...... + c[n] v[n] = 0

that is, at least one of the vectors is a linear combination of the remaining vectors.

The set of vectors is linearly independent if any zero combination

c[1] v[1] + c[2] v[2] + c[3] v[3] + ...... + c[n] v[n] = 0

implies that c[1] = c[2] = c[3] = ... = c[n] = 0.

***************************************************************

Examples of Linear Dependent and Independent Sets

Example 1 : Consider the three vectors

> v1:=matrix(3,1,[1,2,3]):
v2:=matrix(3,1,[4,3,1]):
v3:=matrix(3,1,[5,5,4]):

> evalm(v1),evalm(v2),evalm(v3);

matrix([[1], [2], [3]]), matrix([[4], [3], [1]]), m...

>

Set up the equations.

> c1*evalm(v1)+c2*evalm(v2)+c3*evalm(v3) = matrix(3,1,[0,0,0]);

c1*matrix([[1], [2], [3]])+c2*matrix([[4], [3], [1]...

>

Notice that this forms a homogenous system of equations.

> augment(v1,v2,v3)*matrix(3,1,[c1,c2,c3])=matrix(3,1,[0,0,0]);

matrix([[1, 4, 5], [2, 3, 5], [3, 1, 4]])*matrix([[...

>

Solve the linear system.

> rref(augment(v1,v2,v3,matrix(3,1,[0,0,0])));

matrix([[1, 0, 1, 0], [0, 1, 1, 0], [0, 0, 0, 0]])

>

Notice that we can write one of the vectors v[1], v[2], v[3] as a linear combination of the other vectors.

Example 2 : Consider the three vectors

> v1 := matrix(4,1,[1,2,3,1]): v2:= matrix(4,1,[2,2,1,3]): v3:=matrix(4,1,[-1,2,7,3]):

> evalm(v1),evalm(v2),evalm(v3);

matrix([[1], [2], [3], [1]]), matrix([[2], [2], [1]...

Set up the equations.

> c1*evalm(v1)+c2*evalm(v2)+c3*evalm(v3)= matrix(4,1,[0,0,0,0]);

c1*matrix([[1], [2], [3], [1]])+c2*matrix([[2], [2]...

>

Notice that this forms a homogenous system of equations.

> augment(v1,v2,v3)*matrix(3,1,[c1,c2,c3])=matrix(4,1,[0,0,0,0]);

matrix([[1, 2, -1], [2, 2, 2], [3, 1, 7], [1, 3, 3]...

>

Solve the linear system.

> rref(augment(v1,v2,v3,matrix(4,1,[0,0,0,0])));

matrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [...

>

Notice that we can NOT write one of the vectors v[1], v[2], v[3] as a linear combination of the other vectors.

Procedure

Determining the linear dependence or independence of a set of vectors reduces to solving

a homogeneous system of linear equations. If the homogeneous system has only the trivial

solution, then the set of vectors is linearly independent; otherwise, if the homogeneous

system has infinitely many solutions, the set of vectors is linearly dependent.

To determine the linear dependence or independence of a set of vectors:

1. Write the linear combination of the vectors and set it equal to zero.

2. Write the associated homogeneous system of linear equations.

3. Solve the homogeneous system.

Definition of Bases

*************************************************

Let W be a subspace of R^n . A subset { w[1], w[2] , . . ., w[k] }of W is

a basis for W if and only if the following two conditions are met:

1.) The vectors w[1], w[2] , . . ., w[k] span W

2.) The vectors w[1], w[2] , . . ., w[k] are linearly independent

*************************************************

Fact 1: A basis for a subspace W is not unique.

Fact 2: All basis for W contain the same number of vectors.

Examples of Bases

Example 3 : Consider the subspace S:

> v1:=matrix(3,1,[1,2,3]):
v2:=matrix(3,1,[-1,3,1]):
v3:=matrix(3,1,[5,1,4]): v4 := matrix(3,1,[1,2,0]):

>

> S = span(evalm(v1),evalm(v2),evalm(v3),evalm(v4));

S = span(matrix([[1], [2], [3]]),matrix([[-1], [3],...

>

Do the vectors v[1], v[2], v[3], v[4] form a basis for S?

> rref(augment(v1,v2,v3,v4,matrix(3,1,[0,0,0])));

matrix([[1, 0, 0, -29/19, 0], [0, 1, 0, 27/19, 0], ...

>

************************************************************

Finding a basis for W = span{ w[1], w[2] , . . ., w[k] }.

1.) Form a matrix A whose jth column vector is w[j] .

2.) Row reduce R to row echelon form H.

3.) The set of all w[j] such that the jth column of H contains a pivot is a basis for W.

*************************************************************

> rref(augment(v1,v2,v3));

matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

>

Example 4: Consider the subspace S:

> v1:=matrix(5,1,[1,-1,0,2,1]):
v2:=matrix(5,1,[0,-3,2,4,2]):
v3:=matrix(5,1,[2,1,-2,0,0]): v4 := matrix(5,1,[3,3,-4,-2,-1]):

>

> S = span(evalm(v1),evalm(v2),evalm(v3),evalm(v4));

S = span(matrix([[1], [-1], [0], [2], [1]]),matrix(...

>

> rref(augment(v1,v2,v3,v4));

matrix([[1, 0, 2, 3], [0, 1, -1, -2], [0, 0, 0, 0],...

>

Dimension of a Subspace

********************************************

FACTS:

1.) Let W be a subspace of R^n . Let w[1], w[2] , . . ., w[k] be vectors

in W that span W, and let v[1], v[2] , . . ., v[m] be vectors in W

that are linear independent. Then m <= k .

2.) Any two bases of a subspace W of R^n contain the same

number of vectors.

3.) Let W be a subspace of R^n . The number of elements in a basis

for W is the dimension of W and denoted by dim(W).

********************************************

The vector space R^n has dimension n, i.e. dim( R^n ) = n.

dim({0}) = 0.

Example 3 (revisited): Consider the subspace S:

> v1:=matrix(3,1,[1,2,3]):
v2:=matrix(3,1,[-1,3,1]):
v3:=matrix(3,1,[5,1,4]): v4 := matrix(3,1,[1,2,0]):

>

> S = span(evalm(v1),evalm(v2),evalm(v3),evalm(v4));

S = span(matrix([[1], [2], [3]]),matrix([[-1], [3],...

>

What is the dimension of S?

> rref(augment(v1,v2,v3,v4));

matrix([[1, 0, 0, -29/19], [0, 1, 0, 27/19], [0, 0,...

>

**********************************************

FACTS:

1.) Every subspace W of R^n has a basis and dim(W) <= n .

2.) Every independent set of vectors in R^n can be enlarged, if

necessary to become a basis for R^n .

3.) If W is a subspace of R^n and dim(W) <= k , then

a.) every independent set of k vectors in W is a basis for W and

b.) every set of k vectors in W that spans W is a basis for W.

**************************************************

Example 5: Enlarge the independent set of the two vectors to form a basis for R^3

> v1 := matrix(3,1,[1,1,-1]); v2:=matrix(3,1,[1,2,-2]);

v1 := matrix([[1], [1], [-1]])

v2 := matrix([[1], [2], [-2]])

> v3 := matrix(3,1,[?,?,?]);

>

> rref(augment(v1,v2,v3));

>

Exercises

7, 9, 11, 12, 15, 19, 21, 22, 25, 27, 28.