Condition Number Example - A Line
Thomas J. Kennedy
Suppose we are interested in the condition number of a line, not just one line, but the general form of a line…
$$ f(x) = mx + b $$
We will assume the general form of the condition number, i.e., we will not address
- $x = 0$
- $f(x) = 0$
First, we need the derivative of $f(x)$, i.e., $f^\prime(x)$.
$$ \begin{eqnarray} f^\prime &=& \frac{d}{dx}\left(mx + b\right)\\ &=& \frac{d}{dx}(mx) + \frac{d}{dx}(b)\\ &=& m\\ \end{eqnarray} $$
$$ \begin{eqnarray} (cond\phantom{1}f)(x) &=& \left| \frac{xf^\prime(x)}{f(x)} \right|\\ &=& \left| \frac{x*m}{mx + b}\right|\\ &=& \left| \frac{mx +(b - b)}{mx + b}\right|\\ &=& \left| \frac{(mx + b) - b}{mx + b}\right|\\ &=& \left| \frac{mx + b}{mx + b} - \frac{b}{mx + b}\right|\\ (cond\phantom{1}f)(x) &=& \left| 1 - \frac{b}{mx + b}\right|\\ \end{eqnarray} $$
Well… where do we go next? Identify the cases! We know (from the general form of the condition number) that…
- $x \ne 0$ and
- $f(x) = mx + b \ne 0$
That removes two cases from consideration
- $\frac{1}{mx + b} = \frac{1}{0}$ - which would be undefined
- $mx + b = b$ due to $x = 0$
That leaves us with two special cases.
-
$m = 0$ and $b \ne 0$
$$ \begin{eqnarray} (cond\phantom{1}f)(x) &=& \left| 1 - \frac{b}{mx + b}\right|\\ &=& \left| 1 - \frac{b}{b}\right|\\ &=& 0\\ \end{eqnarray} $$
A slope of zero indicates a horizontal line (i.e., $f(x) = b$). In such cases… $f(x)$ is independent of $x$
-
$m \approx b$ and $x \ne 1$
$$ \begin{eqnarray} (cond\phantom{1}f)(x) &=& \left| 1 - \frac{b}{mx + b}\right|\\ &\approx& \left| 1 - \frac{b}{bx + b}\right|\\ &\approx& \left| 1 - \frac{1}{x + 1}\right|\\ \end{eqnarray} $$
What about the general answer? In practice… we would probably continue the analysis by deriving an upper bound. However, we will leave the process of bounding condition numbers for a future lecture.