Activity-7-Vector-Spaces- - Matlab-1-6 linear algebra PDF

Title Activity-7-Vector-Spaces- - Matlab-1-6 linear algebra
Author Mk Adonais
Course Linear Algebra With Matlab
Institution Technological Institute of the Philippines
Pages 13
File Size 741 KB
File Type PDF
Total Downloads 32
Total Views 176

Summary

MATLAB ACTIVITY 2 – Matrix in MATLAB
A. Write the syntax that will create the following matrices....


Description

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

Laboratory Activity No. 7 Vectors Spaces Section:

Name: Jaymes Josef Caja Ma. Almeda Lamadrid Gavrielle Asleigh Monzon April Villafuerte Date Performed: November 11, 2021 Instructor: Mr. Jonathan Diosana 1. Objective(s):

CE12S6 Date Submitted: November 13, 2021

1.1To perform basic vector operations in Rn. 1.2To write a vector as a linear combination of other vectors. 1.3To determine whether a set of vectors in a vector space V is a spanning set and linearly independent of V. 1.4 To find the basis and dimension of a vector space. 1.5Find the nullspace and rank of a matrix. 2. Intended Learning Outcomes (ILOs): The students shall be able to: 2.1Demonstrate scientific thinking and the ability to approach scientific resources intelligently. 2.2Utilize MATLAB software in creating a magic square. 2.3Infer appropriate conclusions based upon the results of the activity. 2.4 Reflect on personal transformation along the T.I.P. graduate attributes, specifically, professional competence and critical thinking skills. 3. Discussion: Linear Combination of Vectors A vector in a vector space V is called a linear combination of the vectors u 1, u2,. . .,uk in V when written in the in the form of v = c1u1 + c2u2 + . . . + ckuk ,where c1, c2, . . , c3 are scalars Spanning Set of a Vector Space Let S = { v1, v2, . . . ,vk} be a subset of a vector space V. The set S is called a spanning set of V when every vector in V can be written as a linear combination of vectors in S. In such cases it is said that S spans V.

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

Linear Dependence and Linear Independence A set of vectors S = { v1, v2, . . . ,vk} in a vector space is called linearly independent when the vector equation c 1v 1 + c 2 v 2 + . . . + c kv k= 0 has only the trivial solution c1 = 0, c2 = 0, . . . , ck = 0. If there are also nontrivial solutions, then S is called linearly dependent. Basis for a Vector Space A set of vectors S = { v1, v2, . . . ,vk} in a vector space V is called a basis for V when the following two conditions are true. 1. S spans V. 2. S is linearly independent. Dimension of a Vector Space If a vector space V has a basis consisting of n vectors, then the number n is called the dimension of V, denoted by dim(V) = n. When V consists of the zero vector alone, the dimension of V is defined as zero. Rank and Nullity of a Matrix The dimension of the row (or column) space of a matrix is called the rank of A and is denoted by rank(A). If A a matrix m x n matrix, then the set of all solutions of the homogeneous system of linear equations Ax = 0 which is a subspace of Rn called the nullspace and is denoted by n(A). So, n(A) = { xԑ Rn : Ax = 0}. The dimension of the nullspace of A is called the nullity of A.

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

4. Procedure: Activity 1 Write v as a linear combination of the vectors in S = {( 6, – 7, 8, 6 ), ( 4, 6, – 4, 1 )}, if possible.

a.) v = (– 42, 113, – 112, – 60) Augmented matrix

6 4 − 42 −7 6 113 ] [ 8 − 4 − 112 6 1 − 60 a = -11

b=6

Linear combination equation:

𝑣 = −11𝑎 + 6𝑏

b.) v = ( – 4, – 14, 27/2, 53/8 ) Augmented matrix

6 −7 8

[ 6

4 6 −4 1

a = 1/2, 5/4 b = -7/4, 7/8

−4 − 14 27

2 53 8

]

Technological Institute of the Philippines - Manila Math & Physics Department

Linear combination equation: INCONSISTEN

c.) v = ( 49/2, 99/4, – 14, 19/2 ) Augmented matrix

6

−7

8

[ 6

4

6

−4

1

49 2 99 4 − 14 19 2 ]

a= 3/4 b= 5

3 𝑣 = 𝑎 + 5𝑏 4

linear combination equation:

Course: MATH 022A ONLINE LECTURE

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

Activity 2 Determine the set S = {( 3, 4, 7/2 ), (– 3/2, 6, 2 ), ( 3/4, 5/2, 3/2 )} spans R3 and if the set is linearly independent or linearly dependent, write the equations in augmented matrix.

check for spanning set

3 [

4

7/2

3 − 2 6

2

3 4 5 2 3 2

determinant =

]

Det(a) = -15/8

therefore: S pans R3

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

check for linearly independent or linearly dependent

1 0 0 0 [ 0 1 0 0] 0 0 1 0

c1 = 0 therefore:

c2 = 0

c3 = 0

Set S is linearly independent

Determine the set S = {(0, 1, 1, 1 ), ( 1, 1, 1, 1 ), ( 0, 0, 0, 1 ), ( 0, 0, 1, 1 )} spans R4 and if the set is linearly independent or linearly dependent, write the equations in augmented matrix.

0 1 [ 0 0

1 1 0 0

1 1 0 1

1 1 ] 1 1

Check for spanning set

determinant =

Therefore: Set S spans R4

1 0 [ 0 0

0 1 0 0

0 0 1 0

0 0 ] 0 1

check for linearly independent or linearly dependent C1 = 0

C2 = 0

C3 = 0

C4 = 0

Therefore: Set S is linearly independent

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

Activity 3 1. Determine whether S = {( 0, 2, 2, 0 ), ( 1, 0, 1, 0 ), ( 0, 2, 0, 2 ), ( 1, 0, 0, 1 )} is a basis for the vector space R4. check for linearly independent or linearly dependent

1 0 0 −

0 0

[0

1 0

0

0

1

0

1 0 2 1 0 1 0 2 0 0]

c1 = 1/2 t

c2= -t

c3 = -1/2 t

c4 = t

therefore: Set

S

is

linearly dependent

check for spanning set

0 2 [ 2 0

1 0 1 0

0 2 0 2

1 0 ] 0 1

determinant = 0 Therefore: Set S does not span R4

Conclusion: It is not a basis because set S does not span R4 and it is linearly dependent.

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

2. Determine whether S = {(2, 4, 6, 8, 10), ( 1, 3, 5, 7, 9), ( 3, 1, 2, 4, 8), (6, 4, 2, 10, 7), (5, 9, 6, 8, 1 )} is a basis for the vector space R5. check for linearly independent or linearly dependent

1 0 0 0 [0

0 1 0 0 0

check for spanning set

2 1 4 3 6 5 8 7 [10 9

0 0 1 0 0

0 0 0 1 0

3 6 0 4 2 2 4 10 8 7

0 0 0 0 1]

5 9 6 8 1]

c1 = 0

c4

c2= 0

c3 = 0

=0

c5 = 0

therefore:

Set S is linearly independent

determinant = 224

therefore: Set S spans R5

Conclusion: It is a basis because the set S spans R5 and it is linearly independent

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

Activity 4 Find a.) rank and nullity b.) basis for the nullspace c.) basis for the row space d.) basis for the column space, write your solution in the space provided below. 1. Given matrix A =

a.) Rank and Nullity

4 9 3 −1 4 2 5 1 1 0 [ 1 2 1 0 0] 3 7 2 2 −2

Technological Institute of the Philippines - Manila Math & Physics Department

1 0 3 0 −4 [0 1 − 1 0 2] 0 0 0 1 −2 0 0 0 0 0

Rank = 3 Nullity = (no. of column) – rank =5–3 =2

Course: MATH 022A ONLINE LECTURE

Technological Institute of the Philippines - Manila Math & Physics Department

b.) Basis for the Null Space

10 01 −31 00 − 2 4 0 0 0 1 − 2] [ 0

C1

0

0

0

+ 3C3 + C2 - C3

0

- 4C5 = 0 + 2C5 = 0

+ C4 - 2C5 = 0 C5 = t C4 = 2t C3 = s C2 = s – 2t C1 = 4t – 3s

−3 4 −3 4 −3𝑠 + 4𝑡 1 −2 1 −2 𝑠 − 2𝑡 𝑠 =s 1 + t 0 = | 1 | , 0 2𝑡 0 2 0 2 [ ] [0] [ 1] { 0 [1] } 𝑡

c.) Basis for the Row Space

={(1,0,3,0, −4) , (0,1, −1,0,2) , (0,0,0,1, −2)} 4 2 [ 1 3

9 5 2 7

3 −1 4 1 1 0] 1 0 0 2 2 −2

d.) Basis for Column Space

4 4 9 3 −1 1 1 5 2 [ ],[ ],[ ],[ ],[ 0 ] 0 0 1 2 1 3 7 2 2 −2

Course: MATH 022A ONLINE LECTURE

Technological Institute of the Philippines - Manila Math & Physics Department

2. S = { 1 – x, 2x + 3x2, x2 – 2x3, 2 + x3 } a.) Rank Nullity C1 (1-x) + C2 (2x+3x2) + C3 (x2-2x3) + C4 (2+x3) = u1 + u2x + u3x2 + u4x3 C1 +2xC2 + x2C3 + 2C4 C = c1 +0 + 0 + 2c4 = u1 X = -c1 + 2c2 +0 + 0 = u2 X2 = 0 + 3c2 + c3 +0 = u3 X3 = +0 + 0 - 2c3 + c4 = u 1002 −1 2 0 0 Augmented Matrix [ ] 0310 00−21

Reduced the matrix in row echelon form by row operation. 1001 0100 ] = [ 0010 0001

Rank = 4 Nullity = (no. of column) – rank =4–4 =0 b.) Basis for the Row Space x1 = 0 x2 = 0 x3 = 0 x4 = 0

0 0 = [ ] 0 0

c.) Basis for the Null Space = [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1] d.) Basis for Column Space

0 1 2 0 −1 2 0 ={| | , [ ] , [ ] , [ 0] } 0 1 3 0 0 −2 1 0

Course: MATH 022A ONLINE LECTURE

Technological Institute of the Philippines - Manila Math & Physics Department

Course: MATH 022A ONLINE LECTURE

Conclusion: We were able to solve the system of a linear equation and determine the linear combination of vectors by simply substituting the answers into the supplied formula v = au1 + bu2 + cu3 by using the Gaussian elimination approach to obtain the values of variables a, b, and c in this laboratory exercise. Furthermore, the determinant of the coefficient matrix must not become 0 when it arrives to the spanning set, since if it does, it is no longer spanning. In addition, I noticed that the majority of the problems are more linearly independent than dependent. First, it is important to understand that if a set spans in a vector operation in Rn, it is also linearly independent, implying that it is the basis. The number of vectors determines the dimension. Furthermore, the parameters assist me in determining the nullspace of a matrix, as well as confirming that the MATLAB result is valid.

Proprietary Clause Property of the Technological Institute of the Philippines (T.I.P.). No part of the materials made and uploaded in this learning management system by T.I.P. may be copied, photographed, printed, reproduced, shared, transmitted, translated or reduced to any electronic medium or medium readable form, in whole or in part, without prior consent of T.I.P.

“We accept responsibility for our role in ensuring the integrity of the work submitted by the group in which we participated”...


Similar Free PDFs