You are on page 1of 10

1. Determine the length of each vector.

v = (2, – 1, 3, – 4, 1)

let u be the the transpose of given vector v

>> u = [ 2; – 1; 3; – 4; 1 ],
>> sqrt (v*u)

1. v = (3, – 1, 5, 1, 4, – 4)
2. v = (– 2, 4, 1, 3, – 3, 2)

3. v = (5, – 6, – 2, 9, – 7, 5, – 8)
4. v =

5. v =
6. v = (2.04, 1.23, 0.45, 2.67, 1.09)

2. Find a) II 2u II, b) II 3v II, c) II 2(u + v) II

Example use matlab

u = (1, 2, 3) and v = (2, 4, 1)

>> u = [ 1 2 3 ]; v = [ 2 4 1 ];

>> norm(u)
Solve:

1. u = (3, – 1, 4, – 2) and v = (– 1, 2, 1, – 4)

2. u = (1/2, – 1/3, 2/3, – 2/5) and v = (– 1/2, – 2/3, 1/5, – 4/3)


3. u = (2, – 5, 2, – 1) and v = (– 1/3, – 2/3, – 2/5, – 1/3)

4. u = (14, 12, 9, 16) and v = (23, 14, 18, 8)


5.

3. Find the distance II u – v II between the following vectors.

Example use matlab

u = (1, 2, 3) and v = (2, 4, 1)

>>u = [ 1 2 3 ]; v = [ 2 4 1 ];

>>norm(u – v)
1. u = (3, – 1, 4, – 2 ) and v = (– 1, 2, 1, – 4 )
2. u = (1/2, – 1/3, 2/3, – 2/5 ) and v = (– 1/2, – 2/3, 1/5, – 4/3)
3. u = (2, – 5, 2, – 1) and v = (– 1/3, – 2/3, – 2/5, – 1/3)

4. u = (14, 12, 9, 16) and v = (23, 14, 18, 8)


5.
4. Find the angle between two vectors given.

Example use matlab

X = (1, – 2, 3) and Y = (– 2, 4, – 1)

>> X = [ 1 – 2 3 ]; Y = [– 2 4 – 1 ]

>>acos (X*Y'/ (norm(X)*norm(Y)))

1. u = (3, – 1, 4, – 2 ) and v = (– 1, 2, 1, – 4 )
2. u = (1/2, – 1/3, 2/3, – 2/5 ) and v = (– 1/2, – 2/3, 1/5, – 4/3)
3. u = (2, – 5, 2, – 1) and v = (– 1/3, – 2/3, – 2/5, – 1/3)
4. u = (14, 12, 9, 16) and v = (23, 14, 18, 8)

5.

CONCLUSION:

I therefore conclude that I can use the MATLAB application to find out the length of a
vector by using the command “norm(u)”. In addition to that I can use it to find its angle by using
inputting the formula for the angle of a vector.

You might also like