# Worksheet 1-1

Download the original worksheet: [CMSE382-WS-1_1.pdf](CMSE382-WS-1_1.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$ &emsp;&emsp; (b) $\begin{bmatrix} 1 \\ 1 \\ 0 \\ 1 \end{bmatrix}$ &emsp;&emsp; (c) $\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}$ &emsp;&emsp; (d) $\begin{bmatrix} 1 \\ 1 \end{bmatrix}$

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$.

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

   (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}$.

---

## 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)$ &emsp;&emsp; (b) $(x, 0.5)$ &emsp;&emsp; (c) $(0.75, y)$

2. Draw a geometric shape that shows all possible endpoints of vectors satisfying $\|x\|_1 = 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.

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$.

![Blank axes for sketching the L1, L2, and L-infinity unit balls in 2D.](../../../figures/Lp_examples.png)

---

## 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?

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