Condition number of dot product of vectors

838 Views Asked by At

I was wondering if anybody knows what is the relative condition number of dot product of vectors and how to compute it. I'm just reading about this stuff, but don't really understand how to compute it. Thanks!

1

There are 1 best solutions below

0
On

Let $y$ be a fixed vector and $f(x):=y^Tx$. Since $f$ is a differentiable function of $x$, we have $$ \mathrm{cond}_f(x)=\frac{\|J(x)\|}{\|f(x)\|/\|x\|}, $$ where $J(x)$ is the derivative of $f$ w.r.t. $x$.

For our $f$, we get $J(x)=y^T$, and assuming $y^Tx\neq 0$, $$ \mathrm{cond}_f(x)=\frac{\|y^T\|\|x\|}{|y^Tx|}. $$ If $\|\cdot\|$ is the 2-norm, this turns out to be the inverse of the cosine between $y$ and $x$: $$ \mathrm{cond}_f(x)=\frac{1}{\cos\angle(x, y)}. $$ This makes sense since the value of the dot product is less sensitive if $x$ and $y$ are (close to being) linearly dependent and more sensitive when they are close to being orthogonal.