Open Educational Resources

Linear Vector Spaces: Examples and Problems

Example 1

Which of the following sets are orthonormal basis sets in the Euclidean vector space \mathbb{R}^3?

  • B_1=\{e_1,e_2,e_3\} where e_1=\{1,0,0\}, e_2=\left\{0,\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right\}, and e_3=\left\{0,\frac{1}{\sqrt{2}},\frac{-1}{\sqrt{2}}\right\}
  • B_2=\{e'_1,e'_2,e'_3\} where e'_1=\{1,0,0\}, e'_2=\left\{0,\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right\}, and e'_3=\left\{0,\frac{-1}{\sqrt{2}},\frac{-1}{\sqrt{2}}\right\}
SOLUTION

For the set B_1 we have:

    \[ e_1\cdot e_1=1\qquad e_2\cdot e_2=\sqrt{\left(\frac{1}{\sqrt{2}}\right)^2+\left(\frac{1}{\sqrt{2}}\right)^2}=1 \qquad e_3\cdot e_3=\sqrt{\left(\frac{1}{\sqrt{2}}\right)^2+\left(\frac{1}{\sqrt{2}}\right)^2}=1 \]

Therefore, e_1, e_2, and e_3 are unit vectors. In addition, we have:

    \[ e_1\cdot e_2=0\qquad e_1\cdot e_3=0 \qquad e_2\cdot e_3=\frac{1}{\sqrt{2}}\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{2}}\frac{-1}{\sqrt{2}}=0 \]

Therefore, the three vectors e_1, e_2, and e_3 are orthogonal to each other. Therefore, B_1 is an orthonormal basis set.
For the set B_2 we have:

    \[ e'_2\cdot e'_3=\frac{1}{\sqrt{2}}\frac{-1}{\sqrt{2}}+\frac{1}{\sqrt{2}}\frac{-1}{\sqrt{2}}=-1 \]

Therefore, e'_2 and e'_3 are not orthogonal to each other. Therefore, B_2 is not an orthonormal basis set. In fact, we have e'_3=-e'_2 which means that B_2 is linearly dependent, therefore, it is not even a basis set for \mathbb{R}^3. Notice that the symbol “.” is used in Mathematica for the dot product as shown below.

View Mathematica Code

e1 = {1, 0, 0};
e2 = {0, 1/Sqrt[2], 1/Sqrt[2]};
e3 = {0, 1/Sqrt[2], -1/Sqrt[2]};
e1.e1
e1.e2
e1.e3
e2.e2
e2.e3
e3.e3
ep1 = {1, 0, 0};
ep2 = {0, 1/Sqrt[2], 1/Sqrt[2]};
ep3 = {0, -1/Sqrt[2], -1/Sqrt[2]};
ep1.ep1
ep1.ep2
ep1.ep3
ep2.ep2
ep2.ep3
ep3.ep3

View Numpy Python Code

import numpy as np
e1 = np.array([1, 0, 0]); # Matrix []
e2 = np.array([0, 1/np.sqrt(2), 1/np.sqrt(2)]);
e3 = np.array([0, 1/np.sqrt(2), -1/np.sqrt(2)]);
ep1 = np.array([1, 0, 0]);
ep2 = np.array([0, 1/np.sqrt(2), 1/np.sqrt(2)]);
ep3 = np.array([0, -1/np.sqrt(2), -1/np.sqrt(2)]);
print("B1 =",e1,e2,e3)
print("B2 =",ep1,ep2,ep3)
print("Check orthogonality")
print("e1.e1 =",np.dot(e1,e1)) # dot operation
print("e2.e2 =",np.dot(e2,e2))
print("e3.e3 =",np.dot(e3,e3))
print("e1.e2 =",np.dot(e1,e2))
print("e1.e3 =",np.dot(e1,e3))
print("e2.e3 =",np.dot(e2,e3))
print("e'1.e'1 =",np.dot(ep1,ep1))
print("e'2.e'2 =",np.dot(ep2,ep2))
print("e'3.e'3 =",np.dot(ep3,ep3))
print("e'1.e'2 =",np.dot(ep1,ep2))
print("e'1.e'3 =",np.dot(ep1,ep3))
print("e'2.e'3 =",np.dot(ep2,ep3))

View Sympy Python Code

from sympy.matrices import Matrix
import sympy as sp
sp.init_printing(use_latex="mathjax")
e1 = Matrix([1, 0, 0]); # Matrix []
e2 = Matrix([0, 1/sp.sqrt(2), 1/sp.sqrt(2)]);
e3 = Matrix([0, 1/sp.sqrt(2), -1/sp.sqrt(2)]);
ep1 = Matrix([1, 0, 0]);
ep2 = Matrix([0, 1/sp.sqrt(2), 1/sp.sqrt(2)]);
ep3 = Matrix([0, -1/sp.sqrt(2), -1/sp.sqrt(2)]);
display("B1=",e1,e2,e3)
display("B2=",ep1,ep2,ep3)
display("Check orthogonality")
display("e1.e1=",e1.dot(e1)) # dot operation
display("e2.e2=",e2.dot(e2))
display("e3.e3=",e3.dot(e3))
display("e1.e2=",e1.dot(e2))
display("e1.e3=",e1.dot(e3))
display("e2.e3=",e2.dot(e3))
display("e'1.e'1=",ep1.dot(ep1))
display("e'2.e'2=",ep2.dot(ep2))
display("e'3.e'3=",ep3.dot(ep3))
display("e'1.e'2=",ep1.dot(ep2))
display("e'1.e'3=",ep1.dot(ep3))
display("e'2.e'3=",ep2.dot(ep3))

Example 2

Find the angle between the two vectors x=\{1,1,1\}, and y=\{-1,2,-1\}. Also use the cross product operation to find the vector z=x\times y.

SOLUTION

To find the geometric angle \theta_{xy} between the two vectors x and y, we will use the dot product operation:

    \[ \theta_{xy}=\arccos{\left(\frac{x\cdot y}{\|x\| \|y\|}\right)} \]

We have x\cdot y=-1+2-1=0, \|x\|=\sqrt{3} and \|y\|=\sqrt{6}. Therefore, x and y are orthogonal and \theta_{xy}=\frac{\pi}{2}.
The cross product between x and y gives the vector z as follows:

    \[ z=\{-1-2,-1+1,2+1\}=\{-3,0,3\} \]

View Mathematica Code

x = {1, 1, 1};
y = {-1, 2, -1};
z = Cross[x, y]
Norm[x]
Norm[y]
thetaxy = ArcCos[x.y/Norm[x]/Norm[y]]
(*You can also find the angle between the two vectors using the command VectorAngle*)
VectorAngle[x,y]

View Numpy Python Code

import numpy as np
from numpy.linalg import norm
x = np.array([1, 1, 1])
y = np.array([-1, 2, -1])
z = np.cross(x,y) # cross product
print("x =",x)
print("y =",y)
print("x\u00D7y =",z)
print("|x| =",norm(x)) #gives rounded value normalization
print("|y| =",norm(y))
# angle formula (a*b)/(norm a)(norm b)
print("\u03B8 =",np.arccos(np.dot(x,y)/norm(x)/norm(y)))

View Sympy Python Code

from sympy.matrices import Matrix
import sympy as sp
sp.init_printing(use_latex="mathjax")
x = Matrix([1, 1, 1])
y = Matrix([-1, 2, -1])
z = x.cross(y) # cross product
display("x=",x)
display("y=",y)
display("x\u00D7y=",z)
display("|x|=",x.norm()) # normalization
display("|y|=",y.norm())
# angle formula (a*b)/(norm a)(norm b)
display("\u03B8=",sp.acos(x.dot(y)/x.norm()/y.norm()))

Problems

  1. Show that the following sets are subspaces of \mathbb{R}^2. What is the graphical representation of each subspace? Find two different basis sets for each subspace.
    • Y=\left\{\alpha x\bigg| x=\left(\begin{array}{c}1\\0\end{array}\right), \alpha\in\mathbb{R}\right\}=\mbox{span}\{x\}
    • Z=\left\{\alpha z\bigg| z=\left(\begin{array}{c}1\\1\end{array}\right), \alpha\in\mathbb{R}\right\}=\mbox{span}\{z\}
  2. Show that the following sets are subspaces of \mathbb{R}^3. What is the graphical representation of each subspace? Find two different basis sets for each subspace.
    • Y=\left\{\alpha x\bigg| x=\left(\begin{array}{c}1\\0\\0\end{array}\right), \alpha\in\mathbb{R}\right\}=\mbox{span}\{x\}
    • Z=\left\{\alpha x+\beta y\bigg| x=\left(\begin{array}{c}1\\0\\0\end{array}\right), y=\left(\begin{array}{c}0\\1\\0\end{array}\right),\alpha,\beta\in\mathbb{R}\right\}=\mbox{span}\{x,y\}
  3. Find three vectors that are orthogonal to x=\{1,1\}.
  4. Find three vectors that are orthogonal to x=\{1,1,1\}.
  5. Choose a value for y_2 such that x=\{1,1\}, and y=\{1,y_2\} are linearly independent
  6. Choose two different sets of values for x_2 and y_2 such that x=\{1,x_2\}, and y=\{3,y_2\} are linearly dependent.
  7. Verify that x=\{1,0\}, and y=\{1,2\} are linearly independent and then find the unique expansion of v=\{5,3\} in the basis set B=\{x,y\}.
  8. Verify that x=\{1,-1\}, and y=\{-3,-4\} are linearly independent and then find the unique expansion of v=\{7,4\} in the basis set B=\{x,y\}.
  9. Find two different orthonormal basis sets and two different non-orthonormal basis sets for \mathbb{R}^2.
  10. Find two different orthonormal basis sets and two different non-orthonormal basis sets for \mathbb{R}^3.
  11. Find two different orthonormal basis sets and two different non-orthonormal basis sets for \mathbb{R}^3. The basis sets should include vector \{1, 0, 0\}. Hint: An orthonormal basis set is a basis set whose vectors satisfy two conditions. The first condition is that the vectors in the basis set are orthogonal to each other and the second condition is that each vector has a unit norm.
  12. Show that the following vectors are linearly dependent x=\{1,1,1\}, y=\{1,2,1\}, and z=\{0,-1,0\}.
  13. Show that the following vectors are linearly dependent x=\{1,2,3\}, y=\{1,-1,2\}, and z=\{-1,-5,-4\}.
  14. Verify that the following vectors are linearly independent x=\{1,0,1\}, y=\{1,2,1\}, and z=\{0,-1,1\}. Then, find the unique expansion of v=\{5,3,2\} in the basis set B=\{x,y,z\}.
  15. Verify that the following vectors are linearly independent x=\{1,-1,1\}, y=\{3,2,1\}, and z=\{2,2,2\}. Then, find the unique expansion of v=\{7,2,5\} in the basis set B=\{x,y,z\}.
  16. Use the cross product to find a vector orthogonal to both x=\{1,1,1\} and y=\{1,2,0\}. Also, find the area of the parallelogram formed by the two vectors x and y.
  17. Use the cross product to find a vector orthogonal to both x=\{1,2,1\} and y=\{1,0,0\}. Also, find the area of the parallelogram formed by the two vectors x and y.
  18. For the shown cuboid, A=\{0,1,0\}, B=\{0,1,1\}, C=\{2,0,1\}, and D=\{2,0,0\}. la
    • Use the cross product operation to find two unit vectors orthogonal to the plane ABCD. What is the relationship between those two vectors?
    • Use the cross product to find the area of the parallelogram ABCD.
    • Find the angle between the vectors representing AC and BC.
    Notice that the line geometric object starting at point A and ending at point B can be represented by a vector AB=B-A.
  19. Determine if the following vectors a, b, c, and d are linearly independent where a=e_1+e_2, b=e_2+e_3, c=e_3+e_4, and d=e_1+e_2+e_3+e_4 while B=\{e_1,e_2,e_3,e_4\} is a set of linearly independent vectors in \mathbb{R}^4.
  20. Which of the following functions f_1, f_2,f_3,f_4:\mathbb{R}^n\rightarrow [0,\infty) defined below satisfy the properties of a norm function (explain your answer). \forall x\in\mathbb{R}^n:
    • f_1(x)=\max_{i\leq n}|x_i|
    • f_2(x)=|x_2|
    • f_3(x)=\sum_{i=1}^n|x_i|
    • f_4(x)=\sum_{i=1}^n x_i
  21. Let u\in\mathbb{R}^n. Assume that \forall v\in\mathbb{R}^n:u\cdot v=0. Show that u is the zero vector. (Hint: Show that the components of u in an orthonormal basis set are all equal to zero)

Leave a Reply

Your email address will not be published.