Worksheet 1-1 (with Solutions)

Worksheet 1-1 (with Solutions)#

Download the original worksheet: CMSE382-WS-1_1.pdf · Solution PDF

Warning

This is an AI-generated transcript of the worksheet and may contain errors or inaccuracies. Please refer to the original course materials for authoritative content.


Worksheet 1-1: Q1#

For the \(L_p\) norm \(\|x\|_p = \sqrt[p]{\sum_{i=1}^{n} |x_i|^p}\), we will check that the restriction \(p \geq 1\) is necessary because for \(0 \leq p < 1\) the function \(\|\cdot\|_p\) is not a norm. Let’s investigate this using the case \(p = \frac{1}{2}\), where

\[\|x\|_{\frac{1}{2}} = \left(\sum_{i=1}^{n} |x_i|^{\frac{1}{2}}\right)^{2}.\]
  1. Write \(\|x\|_{\frac{1}{2}}\) for each of the following vectors \(x\):

    (a) \(e_1\)    (b) \(\begin{bmatrix} 1 \\ 1 \\ 0 \\ 1 \end{bmatrix}\)    (c) \(\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}\)    (d) \(\begin{bmatrix} 1 \\ 1 \end{bmatrix}\)

    Solution

    (a) \((\sqrt{1})^2 = 1\)

    (b) \((\sqrt{1} + \sqrt{1} + \sqrt{0} + \sqrt{1})^2 = 3^2 = 9\)

    (c) \((\sqrt{1} + \sqrt{1} + \sqrt{1} + \sqrt{1})^2 = 4^2 = 16\)

    (d) \((\sqrt{1} + \sqrt{1})^2 = 2^2 = 4\)

  2. Let’s see which of the norm properties (nonnegativity, positive homogeneity, triangle inequality) is violated for \(p = \frac{1}{2}\).

    (a) Show that the nonnegativity property is satisfied for an arbitrary \(x\).

    Solution

    For any entries \(x_i\), we take the square root of the absolute value, which is always non-negative. Summing non-negative numbers gives a non-negative result, and squaring preserves non-negativity. So nonnegativity is satisfied.

    (b) Show that the homogeneity property is satisfied for an arbitrary \(\lambda\) and \(x\).

    Solution
    \[\|\lambda x\|_{1/2} = \left(\sum_{i=1}^{n} |\lambda x_i|^{\frac{1}{2}}\right)^{2} = \left(\sum_{i=1}^{n} |\lambda|^{\frac{1}{2}} |x_i|^{\frac{1}{2}}\right)^{2} = \left(|\lambda|^{\frac{1}{2}} \sum_{i=1}^{n} |x_i|^{\frac{1}{2}}\right)^{2} = |\lambda| \left(\sum_{i=1}^{n} |x_i|^{\frac{1}{2}}\right)^{2} = |\lambda| \|x\|_{1/2}.\]

    So the homogeneity property is satisfied.

    (c) Show the triangle inequality is violated. Specifically, consider the two standard basis vectors \(e_1\) and \(e_2\) and check whether \(\|e_1 + e_2\|_{0.5} \leq \|e_1\|_{0.5} + \|e_2\|_{0.5}\).

    Solution

    From part 1, \(\|e_1 + e_2\|_{0.5} = \|(1,1)\|_{0.5} = 4\).

    Meanwhile, \(\|e_1\|_{0.5} + \|e_2\|_{0.5} = 1 + 1 = 2\).

    Since \(4 \not\leq 2\), the triangle inequality is violated.


Worksheet 1-1: Q2#

Let’s look at a visual representation of planar vectors whose \(L_p\) norm is equal to \(1\).

  1. Start with the \(L_1\) norm. Four vectors that satisfy \(\|x\| = 1\) include \((-1,0)\), \((0,-1)\), \((1,0)\), and \((0,1)\). For each of the following, find the missing \(x\) or \(y\) entry that makes its \(L_1\) norm equal to \(1\).

    (a) \((0.1, y)\)    (b) \((x, 0.5)\)    (c) \((0.75, y)\)

    Solution

    (a) \(y = 0.9\)   (b) \(x = 0.5\)   (c) \(y = 0.25\)

  2. Draw a geometric shape that shows all possible endpoints of vectors satisfying \(\|x\|_1 = 1\).

    Solution

    Since \(\|(x,y)\|_1 = |x| + |y| = 1\), the set of endpoints forms a diamond (square rotated 45°) with vertices at \((\pm 1, 0)\) and \((0, \pm 1)\).

  3. Now work with the \(L_2\) norm. Write the \(L_2\) norm equation for two arbitrary planar vectors and set it equal to \(1\). Does the resulting equation remind you of a geometric shape? Draw it in part (b) of the figure below.

    Solution

    \(\|(x,y)\|_2 = \sqrt{x^2 + y^2} = 1\) gives \(x^2 + y^2 = 1\), which is the equation of a unit circle.

  4. Finally, write the equation that describes \(\|x\|_{\infty} = 1\). What is the requirement on the \(x\), \(y\) components? Draw the geometric shape formed by all vectors satisfying \(\|x\|_{\infty} = 1\).

    Solution

    \(\|x\|_\infty = \max\{|x_1|, |x_2|\} = 1\). This means at least one component has absolute value \(1\) and neither exceeds \(1\). The resulting shape is a square with corners at \((\pm 1, \pm 1)\).

    Completed diagram showing the L1 (diamond), L2 (circle), and L-infinity (square) unit balls in 2D, with labeled axes.


Worksheet 1-1: Q3#

Recall the Cauchy-Schwarz inequality: for any \(\mathbf{x}, \mathbf{y} \in \mathbb{R}^n\),

\[|\mathbf{x}^\top \mathbf{y}| \leq \|\mathbf{x}\|_2 \cdot \|\mathbf{y}\|_2.\]
  1. The left-hand side represents the dot product. Recall \(x \cdot y = \|x\| \|y\| \cos\theta\), where \(\theta\) is the angle between the two vectors. Based on this, when will the two sides of the inequality be equal?

    Solution

    We have \(|x \cdot y| = \|x\| \|y\| |\cos\theta| \leq \|x\| \|y\|\), so equality holds when \(|\cos\theta| = 1\), i.e., \(\theta = 0\) or \(\theta = \pi\). This means the vectors are parallel (pointing in the same or opposite directions).

  2. Sketch two vectors in \(\mathbb{R}^2\) for which the equality holds.

    Solution

    Any two vectors pointing in the same direction or in exactly opposite directions work, e.g., \(x = (1, 2)\) and \(y = (2, 4)\), or \(x = (1, 0)\) and \(y = (-3, 0)\).