MST-022 Solved Assignment
(a) Using Gram Schmidt orthogonalisation process find orthogonal basis for the subspace of
R
4
R
4
R^(4) \mathbb{R}^4 R 4 having basis
w
1
=
[
1
0
1
0
]
,
w
2
=
[
2
0
0
2
]
w
1
=
1
0
1
0
,
w
2
=
2
0
0
2
w_(1)=[[1],[0],[1],[0]],w_(2)=[[2],[0],[0],[2]] \mathrm{w}_1=\left[\begin{array}{l}1 \\ 0 \\ 1 \\ 0\end{array}\right], \mathrm{w}_2=\left[\begin{array}{l}2 \\ 0 \\ 0 \\ 2\end{array}\right] w 1 = [ 1 0 1 0 ] , w 2 = [ 2 0 0 2 ] , and
w
3
=
[
0
0
4
4
]
w
3
=
0
0
4
4
w_(3)=[[0],[0],[4],[4]] \mathrm{w}_3=\left[\begin{array}{l}0 \\ 0 \\ 4 \\ 4\end{array}\right] w 3 = [ 0 0 4 4 ] .
(b) Gradient of the function
f
(
x
,
y
)
=
2
x
2
−
1
3
y
2
f
(
x
,
y
)
=
2
x
2
−
1
3
y
2
f(x,y)=2x^(2)-(1)/(3)y^(2) f(x, y)=2 x^2-\frac{1}{3} y^2 f ( x , y ) = 2 x 2 − 1 3 y 2 at the point
P
(
1
,
2
)
P
(
1
,
2
)
P(1,2) P(1,2) P ( 1 , 2 ) is:
(A)
4
i
−
4
3
j
^
4
i
−
4
3
j
^
4i-(4)/(3) hat(j) 4 \mathrm{i}-\frac{4}{3} \hat{\mathrm{j}} 4 i − 4 3 j ^
(B)
4
i
+
4
3
j
^
4
i
+
4
3
j
^
4i+(4)/(3) hat(j) 4 \mathrm{i}+\frac{4}{3} \hat{\mathrm{j}} 4 i + 4 3 j ^
(C)
4
i
−
3
4
j
^
4
i
−
3
4
j
^
4i-(3)/(4) hat(j) 4 \mathrm{i}-\frac{3}{4} \hat{\mathrm{j}} 4 i − 3 4 j ^
(D)
4
i
+
3
4
j
^
4
i
+
3
4
j
^
4i+(3)/(4) hat(j) 4 \mathrm{i}+\frac{3}{4} \hat{\mathrm{j}} 4 i + 3 4 j ^
(c) Using Taylor’s formula for
f
(
x
,
y
)
=
x
e
y
f
(
x
,
y
)
=
x
e
y
f(x,y)=xe^(y) \mathrm{f}(\mathrm{x}, \mathrm{y})=\mathrm{x} \mathrm{e}^{\mathrm{y}} f ( x , y ) = x e y the quadratic approximation of
f
(
x
,
y
)
f
(
x
,
y
)
f(x,y) \mathrm{f}(\mathrm{x}, \mathrm{y}) f ( x , y ) near origin is:
(A)
x
+
x
y
x
+
x
y
x+xy x+x y x + x y
(B)
x
−
x
y
x
−
x
y
x-xy x-x y x − x y
(C)
2
x
+
y
2
x
+
y
2x+y 2 \mathrm{x}+\mathrm{y} 2 x + y
(D)
x
y
−
x
x
y
−
x
xy-x x y-x x y − x
(d) If
w
=
tan
(
x
y
+
π
)
,
x
=
ln
(
1
+
2
t
)
,
y
=
e
t
/
2
w
=
tan
(
x
y
+
π
)
,
x
=
ln
(
1
+
2
t
)
,
y
=
e
t
/
2
w=tan(xy+pi),x=ln(1+2t),y=e^(t//2) w=\tan (x y+\pi), x=\ln (1+2 t), y=e^{t / 2} w = tan ( x y + π ) , x = ln ( 1 + 2 t ) , y = e t / 2 , then
d
w
d
t
d
w
d
t
(dw)/(dt) \frac{d w}{d t} d w d t at the point
t
=
0
t
=
0
t=0 t=0 t = 0 is equal to:
(A) 2
(B) 0
(C)
−
3
4
−
3
4
-(3)/(4) -\frac{3}{4} − 3 4
(D) -1
Obtain SVD of the matrix
A
=
[
2
1
1
0
0
1
]
A
=
2
1
1
0
0
1
A=[[2,1],[1,0],[0,1]] A=\left[\begin{array}{ll}2 & 1 \\ 1 & 0 \\ 0 & 1\end{array}\right] A = [ 2 1 1 0 0 1 ] .
Explain how the principle of gradient descent works.
Show that
R
n
R
n
R^(n) \mathbb{R}^n R n is a vector space over
R
R
R \mathbb{R} R , under the vector addition and scalar multiplication defined as follows.
For all
x
=
(
x
1
,
x
2
,
x
3
,
…
,
x
n
)
,
y
=
(
y
1
,
y
2
,
y
3
,
…
,
y
n
)
∈
R
n
x
=
x
1
,
x
2
,
x
3
,
…
,
x
n
,
y
=
y
1
,
y
2
,
y
3
,
…
,
y
n
∈
R
n
x=(x_(1),x_(2),x_(3),dots,x_(n)),y=(y_(1),y_(2),y_(3),dots,y_(n))inR^(n) \mathbf{x}=\left(\mathrm{x}_1, \mathrm{x}_2, \mathrm{x}_3, \ldots, \mathrm{x}_{\mathrm{n}}\right), \mathrm{y}=\left(\mathrm{y}_1, \mathrm{y}_2, \mathrm{y}_3, \ldots, \mathrm{y}_{\mathrm{n}}\right) \in \mathbb{R}^{\mathrm{n}} x = ( x 1 , x 2 , x 3 , … , x n ) , y = ( y 1 , y 2 , y 3 , … , y n ) ∈ R n and
α
∈
R
α
∈
R
alpha inR \alpha \in \mathbb{R} α ∈ R
x
+
y
=
(
x
1
,
x
2
,
…
,
x
n
)
+
(
y
1
,
y
2
,
…
,
y
n
)
=
(
x
1
+
y
1
,
x
2
+
y
2
,
…
,
x
n
+
y
n
)
α
x
=
α
(
x
1
,
x
2
,
x
3
,
…
,
x
n
)
=
(
α
x
1
,
α
x
2
,
α
x
3
,
…
,
α
x
n
)
x
+
y
=
x
1
,
x
2
,
…
,
x
n
+
y
1
,
y
2
,
…
,
y
n
=
x
1
+
y
1
,
x
2
+
y
2
,
…
,
x
n
+
y
n
α
x
=
α
x
1
,
x
2
,
x
3
,
…
,
x
n
=
α
x
1
,
α
x
2
,
α
x
3
,
…
,
α
x
n
{:[x+y=(x_(1),x_(2),dots,x_(n))+(y_(1),y_(2),dots,y_(n))=(x_(1)+y_(1),x_(2)+y_(2),dots,x_(n)+y_(n))],[alpha x=alpha(x_(1),x_(2),x_(3),dots,x_(n))=(alphax_(1),alphax_(2),alphax_(3),dots,alphax_(n))]:} \begin{aligned}
& x+y=\left(x_1, x_2, \ldots, x_n\right)+\left(y_1, y_2, \ldots, y_n\right)=\left(x_1+y_1, x_2+y_2, \ldots, x_n+y_n\right) \\
& \alpha x=\alpha\left(x_1, x_2, x_3, \ldots, x_n\right)=\left(\alpha x_1, \alpha x_2, \alpha x_3, \ldots, \alpha x_n\right)
\end{aligned} x + y = ( x 1 , x 2 , … , x n ) + ( y 1 , y 2 , … , y n ) = ( x 1 + y 1 , x 2 + y 2 , … , x n + y n ) α x = α ( x 1 , x 2 , x 3 , … , x n ) = ( α x 1 , α x 2 , α x 3 , … , α x n )
Answer:
Question:-1(a)
Using Gram Schmidt orthogonalisation process find orthogonal basis for the subspace of
R
4
R
4
R^(4) \mathbb{R}^4 R 4 having basis
w
1
=
[
1
0
1
0
]
,
w
2
=
[
2
0
0
2
]
w
1
=
1
0
1
0
,
w
2
=
2
0
0
2
w_(1)=[[1],[0],[1],[0]],w_(2)=[[2],[0],[0],[2]] \mathrm{w}_1=\left[\begin{array}{l}1 \\ 0 \\ 1 \\ 0\end{array}\right], \mathrm{w}_2=\left[\begin{array}{l}2 \\ 0 \\ 0 \\ 2\end{array}\right] w 1 = [ 1 0 1 0 ] , w 2 = [ 2 0 0 2 ] , and
w
3
=
[
0
0
4
4
]
w
3
=
0
0
4
4
w_(3)=[[0],[0],[4],[4]] \mathrm{w}_3=\left[\begin{array}{l}0 \\ 0 \\ 4 \\ 4\end{array}\right] w 3 = [ 0 0 4 4 ] .
Answer:
To find an orthogonal basis for the subspace of
R
4
R
4
R^(4) \mathbb{R}^4 R 4 spanned by the vectors
w
1
=
[
1
0
1
0
]
w
1
=
1
0
1
0
w_(1)=[[1],[0],[1],[0]] \mathbf{w}_1 = \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix} w 1 = [ 1 0 1 0 ] ,
w
2
=
[
2
0
0
2
]
w
2
=
2
0
0
2
w_(2)=[[2],[0],[0],[2]] \mathbf{w}_2 = \begin{bmatrix} 2 \\ 0 \\ 0 \\ 2 \end{bmatrix} w 2 = [ 2 0 0 2 ] , and
w
3
=
[
0
0
4
4
]
w
3
=
0
0
4
4
w_(3)=[[0],[0],[4],[4]] \mathbf{w}_3 = \begin{bmatrix} 0 \\ 0 \\ 4 \\ 4 \end{bmatrix} w 3 = [ 0 0 4 4 ] using the Gram-Schmidt orthogonalization process, we proceed as follows:
Step 1: Set the first orthogonal vector
Start with the first basis vector:
v
1
=
w
1
=
[
1
0
1
0
]
.
v
1
=
w
1
=
1
0
1
0
.
v_(1)=w_(1)=[[1],[0],[1],[0]]. \mathbf{v}_1 = \mathbf{w}_1 = \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix}. v 1 = w 1 = [ 1 0 1 0 ] .
Step 2: Compute the second orthogonal vector
To find
v
2
v
2
v_(2) \mathbf{v}_2 v 2 , subtract the projection of
w
2
w
2
w_(2) \mathbf{w}_2 w 2 onto
v
1
v
1
v_(1) \mathbf{v}_1 v 1 from
w
2
w
2
w_(2) \mathbf{w}_2 w 2 :
v
2
=
w
2
−
proj
v
1
w
2
.
v
2
=
w
2
−
proj
v
1
w
2
.
v_(2)=w_(2)-“proj”_(v_(1))w_(2). \mathbf{v}_2 = \mathbf{w}_2 – \text{proj}_{\mathbf{v}_1} \mathbf{w}_2. v 2 = w 2 − proj v 1 w 2 .
The projection is given by:
proj
v
1
w
2
=
w
2
⋅
v
1
v
1
⋅
v
1
v
1
.
proj
v
1
w
2
=
w
2
⋅
v
1
v
1
⋅
v
1
v
1
.
“proj”_(v_(1))w_(2)=(w_(2)*v_(1))/(v_(1)*v_(1))v_(1). \text{proj}_{\mathbf{v}_1} \mathbf{w}_2 = \frac{\mathbf{w}_2 \cdot \mathbf{v}_1}{\mathbf{v}_1 \cdot \mathbf{v}_1} \mathbf{v}_1. proj v 1 w 2 = w 2 ⋅ v 1 v 1 ⋅ v 1 v 1 .
Compute the dot products:
w
2
⋅
v
1
=
[
2
0
0
2
]
⋅
[
1
0
1
0
]
=
2
⋅
1
+
0
⋅
0
+
0
⋅
1
+
2
⋅
0
=
2
w
2
⋅
v
1
=
2
0
0
2
⋅
1
0
1
0
=
2
⋅
1
+
0
⋅
0
+
0
⋅
1
+
2
⋅
0
=
2
w_(2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
w
2
−
proj
v
1
w
2
=
[
2
0
0
2
]
−
[
1
0
1
0
]
=
[
2
−
1
0
−
0
0
−
1
2
−
0
]
=
[
1
0
−
1
2
]
.
v
2
=
w
2
−
proj
v
1
w
2
=
2
0
0
2
−
1
0
1
0
=
2
−
1
0
−
0
0
−
1
2
−
0
=
1
0
−
1
2
.
v_(2)=w_(2)-“proj”_(v_(1))w_(2)=[[2],[0],[0],[2]]-[[1],[0],[1],[0]]=[[2-1],[0-0],[0-1],[2-0]]=[[1],[0],[-1],[2]]. \mathbf{v}_2 = \mathbf{w}_2 – \text{proj}_{\mathbf{v}_1} \mathbf{w}_2 = \begin{bmatrix} 2 \\ 0 \\ 0 \\ 2 \end{bmatrix} – \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 2 – 1 \\ 0 – 0 \\ 0 – 1 \\ 2 – 0 \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ -1 \\ 2 \end{bmatrix}. v 2 = w 2 − proj v 1 w 2 = [ 2 0 0 2 ] − [ 1 0 1 0 ] = [ 2 − 1 0 − 0 0 − 1 2 − 0 ] = [ 1 0 − 1 2 ] .
Verify orthogonality:
v
1
⋅
v
2
=
1
⋅
1
+
0
⋅
0
+
1
⋅
(
−
1
)
+
0
⋅
2
=
1
−
1
=
0
v
1
⋅
v
2
=
1
⋅
1
+
0
⋅
0
+
1
⋅
(
−
1
)
+
0
⋅
2
=
1
−
1
=
0
v_(1)*v_(2)=1*1+0*0+1*(-1)+0*2=1-1=0 \mathbf{v}_1 \cdot \mathbf{v}_2 = 1 \cdot 1 + 0 \cdot 0 + 1 \cdot (-1) + 0 \cdot 2 = 1 – 1 = 0 v 1 ⋅ v 2 = 1 ⋅ 1 + 0 ⋅ 0 + 1 ⋅ ( − 1 ) + 0 ⋅ 2 = 1 − 1 = 0 , so
v
1
v
1
v_(1) \mathbf{v}_1 v 1 and
v
2
v
2
v_(2) \mathbf{v}_2 v 2 are orthogonal.
Step 3: Compute the third orthogonal vector
To find
v
3
v
3
v_(3) \mathbf{v}_3 v 3 , subtract the projections of
w
3
w
3
w_(3) \mathbf{w}_3 w 3 onto
v
1
v
1
v_(1) \mathbf{v}_1 v 1 and
v
2
v
2
v_(2) \mathbf{v}_2 v 2 from
w
3
w
3
w_(3) \mathbf{w}_3 w 3 :
v
3
=
w
3
−
proj
v
1
w
3
−
proj
v
2
w
3
.
v
3
=
w
3
−
proj
v
1
w
3
−
proj
v
2
w
3
.
v_(3)=w_(3)-“proj”_(v_(1))w_(3)-“proj”_(v_(2))w_(3). \mathbf{v}_3 = \mathbf{w}_3 – \text{proj}_{\mathbf{v}_1} \mathbf{w}_3 – \text{proj}_{\mathbf{v}_2} \mathbf{w}_3. v 3 = w 3 − proj v 1 w 3 − proj v 2 w 3 .
Projection onto
v
1
v
1
v_(1) \mathbf{v}_1 v 1 :
proj
v
1
w
3
=
w
3
⋅
v
1
v
1
⋅
v
1
v
1
.
proj
v
1
w
3
=
w
3
⋅
v
1
v
1
⋅
v
1
v
1
.
“proj”_(v_(1))w_(3)=(w_(3)*v_(1))/(v_(1)*v_(1))v_(1). \text{proj}_{\mathbf{v}_1} \mathbf{w}_3 = \frac{\mathbf{w}_3 \cdot \mathbf{v}_1}{\mathbf{v}_1 \cdot \mathbf{v}_1} \mathbf{v}_1. proj v 1 w 3 = w 3 ⋅ v 1 v 1 ⋅ v 1 v 1 .
Compute:
w
3
⋅
v
1
=
[
0
0
4
4
]
⋅
[
1
0
1
0
]
=
0
⋅
1
+
0
⋅
0
+
4
⋅
1
+
4
⋅
0
=
4
w
3
⋅
v
1
=
0
0
4
4
⋅
1
0
1
0
=
0
⋅
1
+
0
⋅
0
+
4
⋅
1
+
4
⋅
0
=
4
w_(3)*v_(1)=[[0],[0],[4],[4]]*[[1],[0],[1],[0]]=0*1+0*0+4*1+4*0=4 \mathbf{w}_3 \cdot \mathbf{v}_1 = \begin{bmatrix} 0 \\ 0 \\ 4 \\ 4 \end{bmatrix} \cdot \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix} = 0 \cdot 1 + 0 \cdot 0 + 4 \cdot 1 + 4 \cdot 0 = 4 w 3 ⋅ v 1 = [ 0 0 4 4 ] ⋅ [ 1 0 1 0 ] = 0 ⋅ 1 + 0 ⋅ 0 + 4 ⋅ 1 + 4 ⋅ 0 = 4 ,
v
1
⋅
v
1
=
2
v
1
⋅
v
1
=
2
v_(1)*v_(1)=2 \mathbf{v}_1 \cdot \mathbf{v}_1 = 2 v 1 ⋅ v 1 = 2 (from before).
Thus:
proj
v
1
w
3
=
4
2
v
1
=
2
v
1
=
2
[
1
0
1
0
]
=
[
2
0
2
0
]
.
proj
v
1
w
3
=
4
2
v
1
=
2
v
1
=
2
1
0
1
0
=
2
0
2
0
.
“proj”_(v_(1))w_(3)=(4)/(2)v_(1)=2v_(1)=2[[1],[0],[1],[0]]=[[2],[0],[2],[0]]. \text{proj}_{\mathbf{v}_1} \mathbf{w}_3 = \frac{4}{2} \mathbf{v}_1 = 2 \mathbf{v}_1 = 2 \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \\ 2 \\ 0 \end{bmatrix}. proj v 1 w 3 = 4 2 v 1 = 2 v 1 = 2 [ 1 0 1 0 ] = [ 2 0 2 0 ] .
Projection onto
v
2
v
2
v_(2) \mathbf{v}_2 v 2 :
proj
v
2
w
3
=
w
3
⋅
v
2
v
2
⋅
v
2
v
2
.
proj
v
2
w
3
=
w
3
⋅
v
2
v
2
⋅
v
2
v
2
.
“proj”_(v_(2))w_(3)=(w_(3)*v_(2))/(v_(2)*v_(2))v_(2). \text{proj}_{\mathbf{v}_2} \mathbf{w}_3 = \frac{\mathbf{w}_3 \cdot \mathbf{v}_2}{\mathbf{v}_2 \cdot \mathbf{v}_2} \mathbf{v}_2. proj v 2 w 3 = w 3 ⋅ v 2 v 2 ⋅ v 2 v 2 .
Compute:
w
3
⋅
v
2
=
[
0
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1 + 1 + 4 = 6 .
Thus:
proj
v
2
w
3
=
4
6
v
2
=
2
3
[
1
0
−
1
2
]
=
[
2
3
0
−
2
3
4
3
]
.
proj
v
2
w
3
=
4
6
v
2
=
2
3
1
0
−
1
2
=
2
3
0
−
2
3
4
3
.
“proj”_(v_(2))w_(3)=(4)/(6)v_(2)=(2)/(3)[[1],[0],[-1],[2]]=[[(2)/(3)],[0],[-(2)/(3)],[(4)/(3)]]. \text{proj}_{\mathbf{v}_2} \mathbf{w}_3 = \frac{4}{6} \mathbf{v}_2 = \frac{2}{3} \begin{bmatrix} 1 \\ 0 \\ -1 \\ 2 \end{bmatrix} = \begin{bmatrix} \frac{2}{3} \\ 0 \\ -\frac{2}{3} \\ \frac{4}{3} \end{bmatrix}. proj v 2 w 3 = 4 6 v 2 = 2 3 [ 1 0 − 1 2 ] = [ 2 3 0 − 2 3 4 3 ] .
Now compute:
v
3
=
w
3
−
proj
v
1
w
3
−
proj
v
2
w
3
=
[
0
0
4
4
]
−
[
2
0
2
0
]
−
[
2
3
0
−
2
3
4
3
]
.
v
3
=
w
3
−
proj
v
1
w
3
−
proj
v
2
w
3
=
0
0
4
4
−
2
0
2
0
−
2
3
0
−
2
3
4
3
.
v_(3)=w_(3)-“proj”_(v_(1))w_(3)-“proj”_(v_(2))w_(3)=[[0],[0],[4],[4]]-[[2],[0],[2],[0]]-[[(2)/(3)],[0],[-(2)/(3)],[(4)/(3)]]. \mathbf{v}_3 = \mathbf{w}_3 – \text{proj}_{\mathbf{v}_1} \mathbf{w}_3 – \text{proj}_{\mathbf{v}_2} \mathbf{w}_3 = \begin{bmatrix} 0 \\ 0 \\ 4 \\ 4 \end{bmatrix} – \begin{bmatrix} 2 \\ 0 \\ 2 \\ 0 \end{bmatrix} – \begin{bmatrix} \frac{2}{3} \\ 0 \\ -\frac{2}{3} \\ \frac{4}{3} \end{bmatrix}. v 3 = w 3 − proj v 1 w 3 − proj v 2 w 3 = [ 0 0 4 4 ] − [ 2 0 2 0 ] − [ 2 3 0 − 2 3 4 3 ] .
First, compute
w
3
−
proj
v
1
w
3
w
3
−
proj
v
1
w
3
w_(3)-“proj”_(v_(1))w_(3) \mathbf{w}_3 – \text{proj}_{\mathbf{v}_1} \mathbf{w}_3 w 3 − proj v 1 w 3 :
[
0
0
4
4
]
−
[
2
0
2
0
]
=
[
0
−
2
0
−
0
4
−
2
4
−
0
]
=
[
−
2
0
2
4
]
.
0
0
4
4
−
2
0
2
0
=
0
−
2
0
−
0
4
−
2
4
−
0
=
−
2
0
2
4
.
[[0],[0],[4],[4]]-[[2],[0],[2],[0]]=[[0-2],[0-0],[4-2],[4-0]]=[[-2],[0],[2],[4]]. \begin{bmatrix} 0 \\ 0 \\ 4 \\ 4 \end{bmatrix} – \begin{bmatrix} 2 \\ 0 \\ 2 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 – 2 \\ 0 – 0 \\ 4 – 2 \\ 4 – 0 \end{bmatrix} = \begin{bmatrix} -2 \\ 0 \\ 2 \\ 4 \end{bmatrix}. [ 0 0 4 4 ] − [ 2 0 2 0 ] = [ 0 − 2 0 − 0 4 − 2 4 − 0 ] = [ − 2 0 2 4 ] .
Then subtract
proj
v
2
w
3
proj
v
2
w
3
“proj”_(v_(2))w_(3) \text{proj}_{\mathbf{v}_2} \mathbf{w}_3 proj v 2 w 3 :
[
−
2
0
2
4
]
−
[
2
3
0
−
2
3
4
3
]
=
[
−
2
−
2
3
0
−
0
2
−
(
−
2
3
)
4
−
4
3
]
=
[
−
6
3
−
2
3
0
6
3
+
2
3
12
3
−
4
3
]
=
[
−
8
3
0
8
3
8
3
]
.
−
2
0
2
4
−
2
3
0
−
2
3
4
3
=
−
2
−
2
3
0
−
0
2
−
(
−
2
3
)
4
−
4
3
=
−
6
3
−
2
3
0
6
3
+
2
3
12
3
−
4
3
=
−
8
3
0
8
3
8
3
.
[[-2],[0],[2],[4]]-[[(2)/(3)],[0],[-(2)/(3)],[(4)/(3)]]=[[-2-(2)/(3)],[0-0],[2-(-(2)/(3))],[4-(4)/(3)]]=[[-(6)/(3)-(2)/(3)],[0],[(6)/(3)+(2)/(3)],[(12)/(3)-(4)/(3)]]=[[-(8)/(3)],[0],[(8)/(3)],[(8)/(3)]]. \begin{bmatrix} -2 \\ 0 \\ 2 \\ 4 \end{bmatrix} – \begin{bmatrix} \frac{2}{3} \\ 0 \\ -\frac{2}{3} \\ \frac{4}{3} \end{bmatrix} = \begin{bmatrix} -2 – \frac{2}{3} \\ 0 – 0 \\ 2 – (-\frac{2}{3}) \\ 4 – \frac{4}{3} \end{bmatrix} = \begin{bmatrix} -\frac{6}{3} – \frac{2}{3} \\ 0 \\ \frac{6}{3} + \frac{2}{3} \\ \frac{12}{3} – \frac{4}{3} \end{bmatrix} = \begin{bmatrix} -\frac{8}{3} \\ 0 \\ \frac{8}{3} \\ \frac{8}{3} \end{bmatrix}. [ − 2 0 2 4 ] − [ 2 3 0 − 2 3 4 3 ] = [ − 2 − 2 3 0 − 0 2 − ( − 2 3 ) 4 − 4 3 ] = [ − 6 3 − 2 3 0 6 3 + 2 3 12 3 − 4 3 ] = [ − 8 3 0 8 3 8 3 ] .
To simplify, factor out
8
3
8
3
(8)/(3) \frac{8}{3} 8 3 :
v
3
=
8
3
[
−
1
0
1
1
]
=
[
−
8
3
0
8
3
8
3
]
.
v
3
=
8
3
−
1
0
1
1
=
−
8
3
0
8
3
8
3
.
v_(3)=(8)/(3)[[-1],[0],[1],[1]]=[[-(8)/(3)],[0],[(8)/(3)],[(8)/(3)]]. \mathbf{v}_3 = \frac{8}{3} \begin{bmatrix} -1 \\ 0 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} -\frac{8}{3} \\ 0 \\ \frac{8}{3} \\ \frac{8}{3} \end{bmatrix}. v 3 = 8 3 [ − 1 0 1 1 ] = [ − 8 3 0 8 3 8 3 ] .
We can use
[
−
1
0
1
1
]
−
1
0
1
1
[[-1],[0],[1],[1]] \begin{bmatrix} -1 \\ 0 \\ 1 \\ 1 \end{bmatrix} [ − 1 0 1 1 ] as
v
3
v
3
v_(3) \mathbf{v}_3 v 3 since scalar multiples are equivalent for the basis. Verify orthogonality:
v
1
⋅
v
3
=
[
1
0
1
0
]
⋅
[
−
1
0
1
1
]
=
1
⋅
(
−
1
)
+
0
⋅
0
+
1
⋅
1
+
0
⋅
1
=
−
1
+
1
=
0
v
1
⋅
v
3
=
1
0
1
0
⋅
−
1
0
1
1
=
1
⋅
(
−
1
)
+
0
⋅
0
+
1
⋅
1
+
0
⋅
1
=
−
1
+
1
=
0
v_(1)*v_(3)=[[1],[0],[1],[0]]*[[-1],[0],[1],[1]]=1*(-1)+0*0+1*1+0*1=-1+1=0 \mathbf{v}_1 \cdot \mathbf{v}_3 = \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix} \cdot \begin{bmatrix} -1 \\ 0 \\ 1 \\ 1 \end{bmatrix} = 1 \cdot (-1) + 0 \cdot 0 + 1 \cdot 1 + 0 \cdot 1 = -1 + 1 = 0 v 1 ⋅ v 3 = [ 1 0 1 0 ] ⋅ [ − 1 0 1 1 ] = 1 ⋅ ( − 1 ) + 0 ⋅ 0 + 1 ⋅ 1 + 0 ⋅ 1 = − 1 + 1 = 0 ,
v
2
⋅
v
3
=
[
1
0
−
1
2
]
⋅
[
−
1
0
1
1
]
=
1
⋅
(
−
1
)
+
0
⋅
0
+
(
−
1
)
⋅
1
+
2
⋅
1
=
−
1
−
1
+
2
=
0
v
2
⋅
v
3
=
1
0
−
1
2
⋅
−
1
0
1
1
=
1
⋅
(
−
1
)
+
0
⋅
0
+
(
−
1
)
⋅
1
+
2
⋅
1
=
−
1
−
1
+
2
=
0
v_(2)*v_(3)=[[1],[0],[-1],[2]]*[[-1],[0],[1],[1]]=1*(-1)+0*0+(-1)*1+2*1=-1-1+2=0 \mathbf{v}_2 \cdot \mathbf{v}_3 = \begin{bmatrix} 1 \\ 0 \\ -1 \\ 2 \end{bmatrix} \cdot \begin{bmatrix} -1 \\ 0 \\ 1 \\ 1 \end{bmatrix} = 1 \cdot (-1) + 0 \cdot 0 + (-1) \cdot 1 + 2 \cdot 1 = -1 – 1 + 2 = 0 v 2 ⋅ v 3 = [ 1 0 − 1 2 ] ⋅ [ − 1 0 1 1 ] = 1 ⋅ ( − 1 ) + 0 ⋅ 0 + ( − 1 ) ⋅ 1 + 2 ⋅ 1 = − 1 − 1 + 2 = 0 .
All vectors are orthogonal.
Step 4: Verify linear independence
The vectors
v
1
=
[
1
0
1
0
]
v
1
=
1
0
1
0
v_(1)=[[1],[0],[1],[0]] \mathbf{v}_1 = \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix} v 1 = [ 1 0 1 0 ] ,
v
2
=
[
1
0
−
1
2
]
v
2
=
1
0
−
1
2
v_(2)=[[1],[0],[-1],[2]] \mathbf{v}_2 = \begin{bmatrix} 1 \\ 0 \\ -1 \\ 2 \end{bmatrix} v 2 = [ 1 0 − 1 2 ] ,
v
3
=
[
−
1
0
1
1
]
v
3
=
−
1
0
1
1
v_(3)=[[-1],[0],[1],[1]] \mathbf{v}_3 = \begin{bmatrix} -1 \\ 0 \\ 1 \\ 1 \end{bmatrix} v 3 = [ − 1 0 1 1 ] are orthogonal and non-zero, hence linearly independent. They span the same subspace as
w
1
,
w
2
,
w
3
w
1
,
w
2
,
w
3
w_(1),w_(2),w_(3) \mathbf{w}_1, \mathbf{w}_2, \mathbf{w}_3 w 1 , w 2 , w 3 since each
v
i
v
i
v_(i) \mathbf{v}_i v i is a linear combination of
w
1
,
…
,
w
i
w
1
,
…
,
w
i
w_(1),dots,w_(i) \mathbf{w}_1, \ldots, \mathbf{w}_i w 1 , … , w i .
Final Answer
An orthogonal basis for the subspace is:
{
[
1
0
1
0
]
,
[
1
0
−
1
2
]
,
[
−
1
0
1
1
]
}
.
1
0
1
0
,
1
0
−
1
2
,
−
1
0
1
1
.
{[[1],[0],[1],[0]],[[1],[0],[-1],[2]],[[-1],[0],[1],[1]]}. \left\{ \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ -1 \\ 2 \end{bmatrix}, \begin{bmatrix} -1 \\ 0 \\ 1 \\ 1 \end{bmatrix} \right\}. { [ 1 0 1 0 ] , [ 1 0 − 1 2 ] , [ − 1 0 1 1 ] } .