Comprehensive Exercises on Vectors

Exercises

Exercise 1

Let v=(3,4)v = (3, 4). Compute the norm of vv and the unit vector in the direction of vv.

vectornormunit vector

Approach: Use the Euclidean norm, which is the square root of the sum of the squared components, and then divide the vector by that norm to obtain the vector of length 1 pointing in the same direction.

Steps:

  1. Norm: ∥v∥=vx2+vy2=32+42=9+16=25=5\|v\| = \sqrt{v_x^2 + v_y^2} = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5
  2. Unit vector: v^=v∥v∥=15(3,4)=(35,45)\hat{v} = \frac{v}{\|v\|} = \frac{1}{5}(3, 4) = \left(\frac{3}{5}, \frac{4}{5}\right)
  3. Check: ∥v^∥=925+1625=1=1\|\hat{v}\| = \sqrt{\frac{9}{25} + \frac{16}{25}} = \sqrt{1} = 1

Answer:∥v∥=5\|v\| = 5 and v^=(35,45)\hat{v} = \left(\frac{3}{5}, \frac{4}{5}\right)

Exercise 2

Let v=(2,1)v = (2, 1) and w=(1,3)w = (1, 3). Compute (1) v+wv + w, (2) 2v−w2v - w, and (3) the area of the parallelogram spanned by vv and ww.

vector additionscalar multiplicationparallelogram rule

Approach: Addition and scalar multiplication act component by component, and the parallelogram rule says that the area of the parallelogram spanned by two vectors is the absolute value of their two-dimensional determinant.

Steps:

  1. v+w=(2+1,  1+3)=(3,4)v + w = (2 + 1,\; 1 + 3) = (3, 4)
  2. 2v−w=(4,2)−(1,3)=(3,−1)2v - w = (4, 2) - (1, 3) = (3, -1)
  3. Area: S=∣vxwy−vywx∣=∣2⋅3−1⋅1∣=∣6−1∣=5S = |v_x w_y - v_y w_x| = |2 \cdot 3 - 1 \cdot 1| = |6 - 1| = 5

Answer:(1) v+w=(3,4)v + w = (3, 4);(2) 2v−w=(3,−1)2v - w = (3, -1);(3) the area is 55

Exercise 3

Let v1=(1,0)v_1 = (1, 0), v2=(0,1)v_2 = (0, 1) and v3=(1,1)v_3 = (1, 1). Express the vector (3,2)(3, 2) as a linear combination of these three vectors, and decide whether the representation is unique.

linear combinationspanlinear dependence

Approach: Set up the component equations for the coefficients and see how many free parameters they leave. A free parameter means the representation is not unique, which happens precisely because the three vectors are linearly dependent.

Steps:

  1. Write av1+bv2+cv3=(a+c,  b+c)=(3,2)a v_1 + b v_2 + c v_3 = (a + c,\; b + c) = (3, 2)
  2. This gives a+c=3a + c = 3 and b+c=2b + c = 2, so a=3−ca = 3 - c and b=2−cb = 2 - c
  3. The parameter cc is free, so there are infinitely many representations. For instance:
    • c=0c = 0: (3,2)=3v1+2v2(3, 2) = 3v_1 + 2v_2
    • c=1c = 1: (3,2)=2v1+1v2+1v3(3, 2) = 2v_1 + 1v_2 + 1v_3

Answer:(3,2)=3v1+2v2=2v1+v2+v3(3, 2) = 3v_1 + 2v_2 = 2v_1 + v_2 + v_3; the representation is not unique

Exercise 4

Decide whether the set {(1,2),(2,4)}\{(1, 2), (2, 4)\} is linearly dependent or linearly independent, and exhibit the relation that settles the question.

linear dependencelinear independencelinear combination

Approach: Look for scalars that are not all zero and that make the linear combination vanish. Since one vector is a multiple of the other, such a relation must exist.

Steps:

  1. Let c1(1,2)+c2(2,4)=(0,0)c_1(1, 2) + c_2(2, 4) = (0, 0)
  2. Both component equations give the same condition: c1+2c2=0c_1 + 2c_2 = 0
  3. Take c1=2c_1 = 2, c2=−1c_2 = -1: 2(1,2)−(2,4)=(2,4)−(2,4)=(0,0)2(1, 2) - (2, 4) = (2, 4) - (2, 4) = (0, 0)
  4. The coefficients are not all zero, so the set is linearly dependent

Answer:The set is linearly dependent, with the relation 2v1−v2=02v_1 - v_2 = \mathbf{0}

Exercise 5

Decide whether the set {(1,0),(0,1),(1,1)}\{(1, 0), (0, 1), (1, 1)\} is linearly independent, and describe its span.

linear dependencespanbasis

Approach: Compare the third vector with the first two. If one of them can be written as a combination of the others, the set is dependent and the span is already determined by the remaining vectors.

Steps:

  1. Notice that (1,1)=(1,0)+(0,1)(1, 1) = (1, 0) + (0, 1), that is, v3=v1+v2v_3 = v_1 + v_2
  2. This is a nontrivial relation, so the three vectors are linearly dependent
  3. The vectors (1,0)(1, 0) and (0,1)(0, 1) are not collinear, so they already span the whole plane
  4. Adding a dependent vector does not enlarge the span, so span⁡{(1,0),(0,1),(1,1)}=R2\operatorname{span}\{(1,0),(0,1),(1,1)\} = \mathbb{R}^2

Answer:The set is linearly dependent and its span is the whole plane R2\mathbb{R}^2

Exercise 6

Find a basis for the span of {(1,2,0),(0,1,1),(1,3,1)}\{(1, 2, 0), (0, 1, 1), (1, 3, 1)\} and give the dimension of that span.

basisdimensionspan

Approach: Look for a vector that is a combination of the others, discard it, and check that the remaining vectors are not collinear. The number of surviving vectors is the dimension, which is also the rank of the original set.

Steps:

  1. Compare the third vector with the first two: (1,2,0)+(0,1,1)=(1,3,1)(1, 2, 0) + (0, 1, 1) = (1, 3, 1), so v3=v1+v2v_3 = v_1 + v_2
  2. The set is therefore dependent, and v3v_3 may be removed without changing the span
  3. The remaining vectors (1,2,0)(1, 2, 0) and (0,1,1)(0, 1, 1) are not multiples of each other, so they are linearly independent and span the same space
  4. Hence a basis is {(1,2,0),(0,1,1)}\{(1, 2, 0), (0, 1, 1)\}, and the dimension (the rank of the original set) is 2

Answer:A basis is {(1,2,0),(0,1,1)}\{(1, 2, 0), (0, 1, 1)\} and the dimension is 22

Exercise 7

Prove that {(1,1,0),(0,1,1),(1,0,1)}\{(1,1,0), (0,1,1), (1,0,1)\} is a basis of R3\mathbb{R}^3, and find the coordinates of β=(2,3,4)\beta = (2, 3, 4) in that basis.

linear independencebasiscoordinates

Approach: A set of three vectors in R3\mathbb{R}^3 is a basis when its column matrix has a nonzero determinant. Once that is settled, write down the coordinate system and solve it.

Steps:

  1. Form the matrix whose columns are the three vectors: (101110011)\begin{pmatrix} 1 & 0 & 1 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix}
  2. Its determinant is 1(1⋅1−0⋅1)−0(1⋅1−0⋅0)+1(1⋅1−1⋅0)=1+0+1=2≠01(1 \cdot 1 - 0 \cdot 1) - 0(1 \cdot 1 - 0 \cdot 0) + 1(1 \cdot 1 - 1 \cdot 0) = 1 + 0 + 1 = 2 \neq 0, so the vectors are linearly independent and form a basis of R3\mathbb{R}^3
  3. Solve for the coordinates: {x1+x3=2x1+x2=3x2+x3=4\begin{cases} x_1 + x_3 = 2 \\ x_1 + x_2 = 3 \\ x_2 + x_3 = 4 \end{cases}
  4. Adding the three equations gives 2(x1+x2+x3)=92(x_1 + x_2 + x_3) = 9, so x1+x2+x3=92x_1 + x_2 + x_3 = \frac{9}{2}
  5. Hence x3=92−3=32x_3 = \frac{9}{2} - 3 = \frac{3}{2}, x2=92−2=52x_2 = \frac{9}{2} - 2 = \frac{5}{2} and x1=92−4=12x_1 = \frac{9}{2} - 4 = \frac{1}{2}

Answer:The set is a basis of R3\mathbb{R}^3, and the coordinates of β\beta are (12,52,32)\left(\frac{1}{2}, \frac{5}{2}, \frac{3}{2}\right)

Exercise 8

Show that the set of all real polynomials of degree at most 2 forms a vector space, give a basis for it, and state its dimension.

vector spaceaxiomspolynomial space

Approach: Check the closure requirements and the eight axioms, noting that they are inherited from the real numbers through the usual arithmetic of polynomials. Then count the free coefficients.

Steps:

  1. Closure under addition: the sum of two polynomials of degree ≤2\leq 2 still has degree ≤2\leq 2
  2. Closure under scalar multiplication: c⋅p(x)c \cdot p(x) still has degree ≤2\leq 2
  3. Associativity, commutativity, the zero element, additive inverses, distributivity and the identity element all hold because they hold for real coefficients
  4. Hence the set is a vector space
  5. Every polynomial a0+a1x+a2x2a_0 + a_1x + a_2x^2 is uniquely a0⋅1+a1⋅x+a2⋅x2a_0 \cdot 1 + a_1 \cdot x + a_2 \cdot x^2, so a basis is {1,x,x2}\{1, x, x^2\} and the dimension is 3

Answer:It is a vector space with basis {1,x,x2}\{1, x, x^2\} and dimension 33

Exercise 9

Give a basis for the space of all 2×22\times2 real matrices and state its dimension.

dimensionmatrix spacebasis

Approach: A 2×22\times2 matrix has four free entries, and each entry can be isolated in a matrix unit. Those four matrix units span the space and are independent.

Steps:

  1. Every 2×22\times2 matrix can be written as A=a11(1000)+a12(0100)+a21(0010)+a22(0001)A = a_{11}\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} + a_{12}\begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} + a_{21}\begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} + a_{22}\begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}
  2. The four coefficients a11,a12,a21,a22a_{11}, a_{12}, a_{21}, a_{22} are recovered from the entries of AA, so the representation is unique and the four matrix units are linearly independent
  3. The dimension equals the number of basis vectors, that is, the number of free entries

Answer:A basis is {(1000),(0100),(0010),(0001)}\left\{\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}\right\} and the dimension is 44

Exercise 10

In the new basis B={b1,b2}\mathcal{B} = \{\mathbf{b}_1, \mathbf{b}_2\} with b1=(1,1)\mathbf{b}_1 = (1, 1) and b2=(1,−1)\mathbf{b}_2 = (1, -1), find the coordinates of the vector v=(3,2)v = (3, 2). Give the change-of-basis matrix BB and its inverse.

change of basistransition matrixcoordinates

Approach: The columns of BB are the new basis vectors written in standard coordinates, and the new coordinates are obtained by multiplying by B−1B^{-1}.

Steps:

  1. The change-of-basis matrix is B=(111−1)B = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}
  2. Its inverse is B−1=1−2(−1−1−11)=(0.50.50.5−0.5)B^{-1} = \frac{1}{-2}\begin{pmatrix} -1 & -1 \\ -1 & 1 \end{pmatrix} = \begin{pmatrix} 0.5 & 0.5 \\ 0.5 & -0.5 \end{pmatrix}
  3. The new coordinates are [v]B=B−1v=(0.5⋅3+0.5⋅20.5⋅3−0.5⋅2)=(2.50.5)[v]_\mathcal{B} = B^{-1}v = \begin{pmatrix} 0.5 \cdot 3 + 0.5 \cdot 2 \\ 0.5 \cdot 3 - 0.5 \cdot 2 \end{pmatrix} = \begin{pmatrix} 2.5 \\ 0.5 \end{pmatrix}
  4. Check: 2.5b1+0.5b2=2.5(1,1)+0.5(1,−1)=(3,2)2.5\mathbf{b}_1 + 0.5\mathbf{b}_2 = 2.5(1,1) + 0.5(1,-1) = (3, 2)

Answer:B=(111−1)B = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, B−1=(0.50.50.5−0.5)B^{-1} = \begin{pmatrix} 0.5 & 0.5 \\ 0.5 & -0.5 \end{pmatrix}, and [v]B=(2.5,  0.5)T[v]_\mathcal{B} = (2.5,\; 0.5)^T

Exercise 11

Let v=(1,2,3)v = (1, 2, 3) and w=(4,−1,2)w = (4, -1, 2). Compute the inner product v⋅wv \cdot w, the two norms, and decide whether the vectors are orthogonal. Give the cosine of the angle between them.

inner productorthogonal vectorsnorm

Approach: The inner product multiplies the components pairwise and adds the results; the norms are the square roots of the self inner products; orthogonality means the inner product vanishes.

Steps:

  1. Inner product: v⋅w=1⋅4+2⋅(−1)+3⋅2=4−2+6=8v \cdot w = 1 \cdot 4 + 2 \cdot (-1) + 3 \cdot 2 = 4 - 2 + 6 = 8
  2. Norms: ∥v∥=12+22+32=14\|v\| = \sqrt{1^2 + 2^2 + 3^2} = \sqrt{14}, ∥w∥=42+(−1)2+22=21\|w\| = \sqrt{4^2 + (-1)^2 + 2^2} = \sqrt{21}
  3. Orthogonality: since v⋅w=8≠0v \cdot w = 8 \neq 0, the vectors are not orthogonal
  4. Angle: cos⁡θ=v⋅w∥v∥∥w∥=81421=8294\cos\theta = \frac{v \cdot w}{\|v\|\|w\|} = \frac{8}{\sqrt{14}\sqrt{21}} = \frac{8}{\sqrt{294}}

Answer:v⋅w=8v \cdot w = 8, ∥v∥=14\|v\| = \sqrt{14}, ∥w∥=21\|w\| = \sqrt{21}; the vectors are not orthogonal, and cos⁡θ=8294\cos\theta = \frac{8}{\sqrt{294}}

Exercise 12

Use the Gram-Schmidt process to orthogonalize {(1,1,0),(1,0,1)}\{(1,1,0), (1,0,1)\}, and then turn the result into an orthonormal set.

Gram-Schmidt processorthogonal vectorsorthonormalisation

Approach: Keep the first vector and subtract the projection of the second one onto it. Once the orthogonal set is known, divide each vector by its own length to make it orthonormal.

Steps:

  1. b⃗1=a⃗1=(1,1,0)\vec{b}_1 = \vec{a}_1 = (1,1,0)
  2. Compute b⃗2\vec{b}_2: (a⃗2,b⃗1)=(1,0,1)⋅(1,1,0)=1(\vec{a}_2, \vec{b}_1) = (1,0,1) \cdot (1,1,0) = 1, (b⃗1,b⃗1)=(1,1,0)⋅(1,1,0)=2(\vec{b}_1, \vec{b}_1) = (1,1,0) \cdot (1,1,0) = 2 b⃗2=(1,0,1)−12(1,1,0)=(0.5,−0.5,1)\vec{b}_2 = (1,0,1) - \frac{1}{2}(1,1,0) = (0.5, -0.5, 1)
  3. Check orthogonality: (1,1,0)⋅(0.5,−0.5,1)=0.5−0.5+0=0(1,1,0) \cdot (0.5,-0.5,1) = 0.5 - 0.5 + 0 = 0
  4. Lengths: ∥b⃗1∥=2\|\vec{b}_1\| = \sqrt{2} and ∥b⃗2∥=0.25+0.25+1=62\|\vec{b}_2\| = \sqrt{0.25 + 0.25 + 1} = \frac{\sqrt{6}}{2}
  5. Unit vectors: e⃗1=(12,12,0)\vec{e}_1 = \left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, 0\right) and e⃗2=(16,−16,26)\vec{e}_2 = \left(\frac{1}{\sqrt{6}}, -\frac{1}{\sqrt{6}}, \frac{2}{\sqrt{6}}\right)

Answer:The orthogonal set is {(1,1,0),(0.5,−0.5,1)}\{(1,1,0), (0.5,-0.5,1)\} and the orthonormal set is {(12,12,0),(16,−16,26)}\left\{\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, 0\right), \left(\frac{1}{\sqrt{6}}, -\frac{1}{\sqrt{6}}, \frac{2}{\sqrt{6}}\right)\right\}

Exercise 13

Decide whether the matrix Q=(0−110)Q = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} is an orthogonal matrix, and compute its determinant.

orthogonal matrixmatrix propertiesdeterminant

Approach: An orthogonal matrix is characterised by QTQ=IQ^T Q = I. Compute the product and the determinant, which must be ±1\pm 1 for an orthogonal matrix.

Steps:

  1. QT=(01−10)Q^T = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}
  2. QTQ=(01−10)(0−110)=(1001)=IQ^T Q = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I
  3. Determinant: ∣Q∣=0⋅0−(−1)⋅1=1|Q| = 0 \cdot 0 - (-1) \cdot 1 = 1

Answer:QQ is an orthogonal matrix, and ∣Q∣=1|Q| = 1

Summary

Symbols Used in This Article

SymbolTypePronunciation / NoteMeaning in This Article
∥v∥\|v\|Mathematical symbolnorm of vThe length of the vector, namely vx2+vy2\sqrt{v_x^2 + v_y^2}
v^\hat{v}Mathematical symbolv hatThe unit vector v^=v/∥v∥\hat{v} = v/\|v\|, pointing in the same direction
0\mathbf{0}Mathematical symbolzero vectorThe zero vector, the right-hand side of a dependence relation
span⁡{v1,…,vn}\operatorname{span}\{v_1, \dots, v_n\}Mathematical symbolspan of the v’sThe set of all linear combinations of the given vectors
c1,…,cnc_1, \dots, c_nMathematical symbolc one through c nThe coefficients of a linear combination, possibly all zero
BBMathematical symbolmatrix BThe change-of-basis matrix, whose columns are the new basis vectors
B−1B^{-1}Mathematical symbolB inverseThe inverse change-of-basis matrix, converting coordinates back to the new basis
v⋅wv \cdot wMathematical symbolv dot wThe inner product, a scalar measuring how the two vectors point
e⃗i\vec{e}_iMathematical symbole iA unit vector obtained by normalising b⃗i\vec{b}_i
QQMathematical symbolmatrix QA matrix satisfying QTQ=IQ^TQ=I, that is, an orthogonal matrix

Found an issue with this content?

Tell us what could be improved.