Mathematical Learning HW1

文章目录
  1. 1. Question 1
  2. 2. Question 2
  3. 3. Question 3
  4. 4. Question 4

Homework for Course MSBD5004 Mathematical Methods for Data Analysis, BDT, HKUST

Question 1

Consider the vector space $R^{n}$

(a)

Check that $|x|_{\infty}=\max_{1 \leq i \leq n} |x_{1}|$ is indeed a norm on $\mathbb{R}^n$

According to the definition of norm , we check

(1)
$\begin{aligned} | x|_{\infty} =\max _{1 \leq i \leq n}\left|x_{i}\right| \geq 0, \forall x \in \mathbb{R}^{n}\end{aligned} $

and $| x|_{\infty} = 0 \Leftrightarrow |x_i|=0 \Leftrightarrow x=\overrightarrow{0}$

(2)
$\begin{aligned} |\alpha x|_{\infty}=\max _{1 \leq i \leq n}|a x_{i}|=|\alpha| \cdot \max _{1 \leq i \leq n}\left|x_{i}\right|=|\alpha| \cdot | x|_{\infty}, \forall x \in \mathbb{R}, \alpha \in \mathbb{R}\end{aligned}$

(3)
$\begin{aligned}|x+y|_{\infty}=\max _{1 \leq i \leq n}\left|x_{i}+y_{i}\right| =\max_{1 \leq i \leq n} \left| x_i \right| +\max_{1 \leq i \leq n}\left| y_{i}\right|=|x|_{\infty}+|y|_{\infty}, \quad \forall x, y \in \mathbb{R}^{n}\end{aligned}$

Therefore, $|x|_{\infty}=\max _{1 \leq i \leq n}\left|x_{i}\right|$ is a norm on $\mathbb{R}^{n}$

(b)

Prove that: for any $x \in \mathbb{R}^{n}, \quad|x|_{\infty}= lim_{p \rightarrow \infty} |x|_p$

Prove:

Let

Because

Then we can get this inequality

when $p \rightarrow \infty, (n)^{\frac{1}{p}} \rightarrow 1$ so $| x |_p \rightarrow |x_m|$

Finally
$\lim _{p \rightarrow \infty}|x|_{p}=\left|x_{m}\right|=\max _{1 \leq i \leq n}\left|x_{i}\right| = |x|_\infty$. Hence proved.

(c)

Prove the equivalence

Prove: According to the definition

Obviously, $\max_{1 \leq i \leq n} \left|x_{i}\right|$ is taken from$\left\{\left|x_{i}\right|,\left|x_{2}\right|, \cdots,\left|x_{n}\right|\right\}$

So, $| x |_{1}=\sum_{i=1}^{n}\left|x_{1}\right| \geqslant \max _{1 \leq i \leq n}\left|x_{i}\right|= |x|_\infty$

Then

Therefore $\sum_{i=1}^{n}\left|x_{i}\right|=n \cdot \max_{1 \leq i \leq n} |x_i|=n \cdot|x|_{\infty}$

Altogether, $|x|_{\infty} \leqslant|x|_{1} \leqslant n \cdot|x|_{\infty}$

Question 2

For any $A \in \mathbb{R}^{m \times n}$, we have defined

(a)

Prove that

Prove :

Note that $\frac{x}{|x|_2}$ has unit length. So we can express

However, $|A|_2$ is a continuous function of $x$ and the unit ball $|x|_{2}=1$ is closed and bounded. Now, on a closed and bounded set, a continuous function always achieves its maximum and minimum values.

Hence, the ‘sup’ can be replaced by ‘max’. i.e.

(b)

Prove that $|\cdot|_2$ is a norm on $\mathbb{R}^{m \times n}$

Prove: According to the definition of norm we check

(1) $\forall A \in \mathbb{R}^{m \times n}$

when $\begin{aligned}\max _{x \in \mathbb{R}^n, |x|_2=1}|A x|_{2} = 0\end{aligned}$ with $|A x|_{2} \geq 0$, we have

Thus, $|A x|_{2} = 0 \Leftrightarrow A=O$

(2) $\forall \alpha \in \mathbb{R}, A \in \mathbb{R}^{m \times n}$

(3) $\forall A,B \in \mathbb{R}^{m \times n}$

Altogether, $|\cdot|_{2}$ is a norm on $\mathbb{R}^{m \times n}$

(c)

Prove that $|A x|_{2} \leqslant|A|_{2}|x|_{2}$ for any $A \in \mathbb{R}^{n \times n}$ and $x \in \mathbb{R}^{n}$

Prove: Consider the definition of matrix 2-norm, $\forall A \in \mathbb{R}^{m \times n}$

It reveals that

Hence proved

(d)

Prove that $|A B|_{2} \leqslant|A|_{2} \cdot|B|_{2}$ for all $A \in \mathbb{R}^{m \times n}$ and $B \in \mathbb{R}^{n \times p}$

Prove: In Question (c) we have proved $|A x|_{2} \leqslant|A|_{2}|x|_{2}$, $A \in \mathbb{R}^{n \times n}$, $x \in \mathbb{R}^{n}$

use this inequality twice. Let $B \in \mathbb{R}^{n \times p}, y \in \mathbb{R}^p$

Then for $y \neq 0$

Hence, $|A B|_{2} \leqslant|A|_{2} \cdot | B |_{2},$ proved

Question 3

Let $a_{1}, a_{2}, \cdots, a_{m}$ be the $m$ given real numbers. Prove that a median of $a_{1}, a_{2}, \dots, a_{m}$ minimizes

over all $b \in R$

Prove: To prove a median can minimize $\left|a_{1}-b\right|+\left|a_{2}-b\right|+\dots+\left|a_{m}-b\right|$ is equivalent to prove a median minimizes

Make $f^{\prime}(b)=0, \text { get } b=\frac{1}{m}\left(a_{1}+a_{2}+\dots+a_{m}\right)$

Due to $f^{\prime \prime}(t)=2 m>0$

Therefore when $b=\frac{1}{m}\left(a_{1}+a_{2}+\dots+a_{m}\right), f(b)$ achieves its minimum
i.e. the median minimizes $\left|a_{1}-b\right|+\left|a_{2}-b\right|+\dots+\left|a_{m}-b\right|$

Question 4

Suppose that the vectors $x_{1}, \ldots . x_{N}$ in $\mathbb{R}^{n}$ are clustered using the K-means algorithm, with group representative $z_1, \cdots, z_{k}$

(a) Suppose the original vectors $x_i$ are nonnegative. i.e. their entries are nonnegative. Explain why the representatives $z_j$ output by the k-means algorithm are also nonnegtive.

Answer: we see the algorithm step 2

Fix group $G_{1}, G_{2}, \cdots, G_{k}$ and solve

Because $x_i$ are nonnegative, according to the equation, $z_j$ is also nonnegative.

(b) Suppse the original vector $x_i$ represent proportions, i.e. their entries are nonnegative and sum to one. Explain why the representatives
$z_j$ output by k-means algorithms are also represent proportions.

Answer: Still consider the equation above, rewrite it to vector form

For $x_{i}+x_{i 2}+\cdots+x_{i n}=1, \quad \sum_{i \in G_{j}} x_{i1}+\sum_{i \in G_{j}} x_{i2}+\cdots+ \sum_{i \in G_{j}} x_{in} = |G_j|$

We can get

and $z_j$ nonnegstive is obvious. Hence proved.

(c) Suppose the original vector $x_i$ are Boolean. i.e. their entries are either 0 or 1. Give an interpretation of $(z_j)_i$, the i-th entry of the $j$ group representative.

Answer:

  • If $(z_j)_i = 0$, it means in group $j$, the number of vectors with i-th entry ZERO is more than those with i-th entry ONE
  • If $(z_j)_i = 1$ it means in group $j$, the number of vectors with i-th entry ONE is more that those with i-th entry ZERO