Exercises

Vectors > Exercises

Subspaces

  1. Consider the set S of points such that

 x_1 + 2 x_2 + 3x_3 = 0, ;; 3x_1 + 2x_2 + x_3 = 0.

Show that S is a subspace. Determine its dimension, and find a basis for it.

  1. Consider the set in mathbf{R}^3, defined by the equation

 P := left{ x in mathbf{R}^3 ~:~ x_1 + 2x_2 + 3x_3 = 1 right}.
    1. Show that the set P is an affine subspace of dimension 2. To this end, express it as x^0 + mbox{bf span}(x^1,x^2), where x^0 in {cal P}, and x^1,x^2 are independent vectors.

    2. Find the minimum Euclidean distance from 0 to the set P. Find a point that achieves the minimum distance. (Hint: using the Cauchy-Schwartz inequality, prove that the minimum-distance point is proportional to a := (1,2,3).)

Projections, scalar product, angles

  1. Find the projection z of the vector x = (2,1) on the line that passes through x_0 = (1,2) and with direction given by the vector u = (1,1).

  2. Find the Euclidean projection of a point x_0 in mathbf{R}^n on a hyperplane mathbf{P} = { x ::: a^Tx = b}, where a in mathbf{R}^n and b in mathbf{R} are given.

  3. Determine the angle between the following two vectors:

 x = left(begin{array}{c} 1  2  3 end{array}right), ;; y = left(begin{array}{c} 3  2  1 end{array}right).

Are these vectors linearly independent?

Orthogonalization

  1. Let x,yinmathbf{R}^n be two unit-norm vectors, that is, such that |x|_2 = |y|_2=1. Show that the vectors x-y and x+y are orthogonal. Use this to find an orthogonal basis for the subspace spanned by x and y.

Generalized Cauchy-Schwartz inequalities

  1. Show that the following inequalities hold for any vector x:

 |x|_infty le |x|_1 le n |x|_infty.
  1. Show that following inequalities hold for any vector x:

 |x|_2 le |x|_1 le sqrt{n} |x|_2.

Hint: use the Cauchy-Schwartz inequality for the second inequality.

  1. In a generalized version of the above inequalities, show that for any non-zero vector x,

 1 le mbox{bf Card}(x) le frac{|x|_1^2}{|x|_2^2},

where mbox{bf Card}(x) is the cardinality of the vector x, defined as the number of non-zero elements in x. For which vectors x is the upper bound attained?

Linear functions

  1. For a n-vector x, with n = 2m-1 odd, we define the median of x as x_m. Now consider the function f : mathbf{R}^n rightarrow mathbf{R}, with values

 f(x) = x_m - frac{1}{n} sum_{i=1}^n x_i.

Express f as a scalar product, that is, find a in mathbf{R}^n such that f(x) = a^Tx for every x. Find a basis for the set of points x such that f(x) = 0.

  1. For alpha in mathbf{R}^2, we consider the ‘‘power law’’ function f : mathbf{R}^2_{++} rightarrow mathbf{R}, with values

 f(x) = x_1^{alpha_1} x_2^{alpha_2}.

Justify the statement: ‘‘the coefficients alpha_i provide the ratio between the relative error in f to a relative error in x_i’’.

  1. Find the gradient of the function f : mathbf{R}^2 rightarrow mathbf{R} that gives the distance from a given point p in mathbf{R}^2 to a point x in mathbf{R}^2.