You are on page 1of 4

Matlab 6.

1 Marvin Jesse
1.
a.
>> A = [v1' v2' v3' u']

A=

4 -2 2 6
2 3 -11 5
1 1 -4 5

>> rref(A)

ans =

1 0 -1 0
0 1 -3 0
0 0 0 1

Not a linear combination of v1, v2, and v3

b.
>> A = [v1' v2' v3' u']

A=

4 -2 2 10
2 3 -11 -15
1 1 -4 -5

>> rref(A)

ans =

1 0 -1 0
0 1 -3 -5
0 0 0 0

Let c3 = t, t free variable


c2 – 3c3 = -5
c2 = 3c3-5 = 3t – 5

c1 – c3 = 0
c1 = c3 = t

u = t*v1 + (3t – 5)*v2 + t*v3


c.
>> A = [v1' v2' v3' u']

A=

4.0000 -2.0000 2.0000 9.0000


2.0000 3.0000 -11.0000 -17.5000
1.0000 1.0000 -4.0000 -6.0000

>> rref(A)

ans =

1.0000 0 -1.0000 -0.5000


0 1.0000 -3.0000 -5.5000
0 0 0 0
Let c3 = t, t free variable
c2- 3c3 = -5.5
c2 = 3c3 – 5.5 = 3t – 5.5

c1 – c3 = -0.5
c1 = c3 – 0.5 = t – 0.5

u = (t – 0.5) * v1 + (3t – 5.5)*v2 + t*v3

2.
a.
>> A = [v1 v2 v3 u]

A=

1 0 3 11
-1 2 1 -1
2 1 0 3
4 1 2 13

>> rref(A)

ans =

1 0 0 2
0 1 0 -1
0 0 1 3
0 0 0 0

c3 = 3, c2 = -1, c1 = 2
u = 2*v1 – v2 + 3*v3
b.
>> A = [v1 v2 v3 u]

A=

1 0 3 1
-1 2 1 0
2 1 0 1
4 1 2 1

>> rref(A)

ans =

1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1

Not a linear combination of v1, v2 and v3

4.
a.
>> x1 = reshape(v1,4,1);
>> x2 = reshape(v2,4,1);
>> x3 = reshape(v3,4,1);
>> x = reshape(u,4,1);
>> A = [x1 x2 x3 x];
>> rref(A)

ans =

1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Not a linear combination of v1, v2 and v3

b.
>> x = reshape(u,4,1);
>> A = [x1 x2 x3 x];
>> rref(A)

ans =

1 0 0 1
0 1 0 1
0 0 1 -2
0 0 0 0

c3 = -2, c2 = 1, c1 = 1
u = v1 + v2 – 2*v3

c.
>> x = reshape(u,4,1);
>> A = [x1 x2 x3 x];
>> rref(A)

ans =

1 0 0 0
0 1 0 1
0 0 1 -2
0 0 0 0
c3 = -2, c2 = 1, c1 = 0
u = v2 – 2*v3

8.
a.
>> x1 = [0;2+i];
>> A = [v1 v2 x1];
>> rref(A)

ans =

1 0 1
0 1 1
c2 = 1, c1 = 1
x1 = v1 + v2

b.
>> x2 = [1;1];
>> A = [v1 v2 x2];
>> rref(A)

ans =

1.0000 + 0.0000i 0.0000 + 0.0000i 0.6000 - 0.8000i


0.0000 + 0.0000i 1.0000 + 0.0000i 0.6000 + 0.2000i
c2 = 0.6+0.2i, c1 = 0.6 – 0.8i
u = (0.6 – 0.8i)*v1 + (0.6+0.2i)*v2

You might also like