Minimize $L_2$-norm of $x1-b$ where $x \in R, b \in R^n$

427 Views Asked by At

Minimize $L_2$-norm of $x1-b$ where $x \in R, b \in R^n$

$||x1-b||_2 \rightarrow ||x1-b||^2_2=||x1-b||^T||x1-b||$ (squaring $L_2$-norm doesn't change outcome and yields quadratic)

$=(x1)^Tx1-(x1)^Tb-b^Tx1+b^Tb$ (expansion)

$=x1^Tx1-b^Tx1-b^Tx1+b^Tb$ (scalars are symmetric and thus equal to their transpose)

$=x^Tx-2b^Tx+b^Tb$ (scalars are symmetric and thus equal to their transpose)

Being quadratic and convex, this function will be minimized when its derivative is equal to zero. Thus,

$\nabla_x(x^Tx-2b^Tx+b^Tb)$ (find the gradient of the function)

$=\lim_{t \to 0}\frac{(x+ty)^T(x+ty)-2b^T(x+ty)+b^Tb-(x^Tx-2b^Tx+b^Tb)}{t}$ (where $t \in R$, $y \in R^n$ and represents an omni-directional vector)

$=\lim_{t \to 0}x^Ty+y^Tx+ty^Ty-2b^Ty$ (cancellation of terms)

$=x^Ty+y^Tx-2b^Ty$ (term involving $t$ disappears in the limit)

Thus, for an arbitrary y (that is, "in any direction")

$=2x-2b^T$ (Cf. James E. Gentle, Matrix Alegra Theory..., 2007, p. 151)

My question: Is my result correct? If not, where did I go wrong? Also appreciate any other chance to learn you see embedded here.

UPDATE (2014-02-27 Thu 4:10pm PST): After reworking this problem on my own and then seeing Dominik's comment below, I thought it best to restate the problem below while leaving the original above (so that comments by 7raider7 and Dominik make sense since they reference the original. Anyway, I wasn't sure if I should create another question or not, so putting here. If it is best to create a new one, then I can do that instead. Now the re-computation:

Minimize $L_2$-norm of $x1-b$ where $x,t \in \mathbb{R}, 1\in\mathbb{R}^n, b \in \mathbb{R}^n$

$\|x1-b\|_2 = \|x-b\|_2$ where now $x\in\mathbb{R}^n$ (is this correct?)

$\|x-b\|^2_2=(x-b)^T(x-b)$ ($L_2$-norm may be rewritten as square)

$=x^Tx-x^Tb-b^Tx+b^Tb$ (expansion)

Being quadratic and convex, this function will be minimized when its derivative is equal to zero. Thus,

$\nabla_x(x^Tx-x^Tb-b^Tx+b^Tb)$ (find the gradient of the function)

$=\lim_{t \to 0}\frac{(x+ty)^T(x+ty)-(x+ty)^Tb-b^T(x+ty)+b^Tb-(x^Tx-x^Tb-b^Tx+b^Tb)}{t}$ ($t\in\mathbb{R},y \in \mathbb{R}^n$ and represents an an arbitrary vector in any direction)

$=\lim_{t \to 0}\frac{x^Tx+tx^Ty+ty^Tx+t^2y^Ty-x^Tb-ty^Tb-b^Tx-tb^Ty+b^Tb-x^Tx+x^Tb+b^Tx-b^Tb}{t}$ (expansion)

$=\lim_{t \to 0}\frac{tx^Ty+ty^Tx+t^2y^Ty-ty^Tb-tb^Ty}{t}$ (cancellation of terms in numerator)

$=\lim_{t \to 0}x^Ty+y^Tx+ty^Ty-y^Tb-b^Ty$ (cancellation of $t$'s from numerator and denominator)

$=x^Ty+y^Tx-y^Tb-b^Ty$ (remaining $t$ term disappears in the limit)

Thus, for an arbitrary y (that is, "in any direction")

$=x^T+x-b-b^T$ (Cf. James E. Gentle, Matrix Alegra Theory..., 2007, p. 151)

Can I boil this down further? It would seem the transposes are interfering with the any further simplification.

1

There are 1 best solutions below

0
On BEST ANSWER

Generally speaking: $$ ||\cdot||:\mathbb{R^n}\rightarrow\mathbb{R}^+, $$

And therefore the minimum of $||x||$ is when $x=0$.

Thus, yes, you found out that: $$ \min_{b\in\mathbb{R^n}}||x-b||=0, $$ i.e. $b=x$.