% ----------------------------------------------------------------------

\chapter{Primes, roots and averages}
\label{noth}

This chapter gathers a few significant topics, each of whose treatment
seems too brief for a chapter of its own.

% ----------------------------------------------------------------------

\section{Prime numbers}
\label{noth:220}
\index{prime number}
\index{composite number}
\index{integer!prime}
\index{integer!composite}

A \emph{prime number}---or simply, a \emph{prime}---is an integer greater
than one, divisible only by one and itself.  A \emph{composite number}
is an integer greater than one and not prime.  A composite number can be
composed as a product of two or more prime numbers.  All positive
integers greater than one are either composite or prime.

\index{number theory}
\index{cryptography}
The mathematical study of prime numbers and their incidents constitutes
\emph{number theory,} and it is a deep area of mathematics.  The deeper
results of number theory seldom arise in applications,%
\footnote{
  The deeper results of number theory do arise in cryptography, or so
  the author has been led to understand.  Although cryptography is
  literally an application of mathematics, its spirit is that of pure
  mathematics rather than of applied.  If you seek cryptographic
  derivations, this book is probably not the one you want.
}
however, so we will confine our study of number theory in this book to
one or two of its simplest, most broadly interesting results.

\subsection{The infinite supply of primes}
\label{noth:220.10}
\index{prime number!infinite supply of}

The first primes are evidently $2,3,5,7,\mbox{0xB},\ldots$\,.  Is there
a last prime?

To show that there is no last prime, suppose that there were.  More
precisely, suppose that there existed exactly~$N$ primes, with~$N$
finite, letting $p_1,p_2,\ldots,p_N$ represent these primes from least
to greatest.  Now consider the product of all the primes,
\[
  C=\prod_{j=1}^{N}p_j.
\]
What of $C+1$?
Since $p_1=2$ divides~$C$, it cannot divide $C+1$.
Similarly, since $p_2=3$ divides~$C$, it also cannot divide $C+1$.  The
same goes for $p_3=5$, $p_4=7$, $p_5=\mbox{0xB}$, etc.  Apparently none
of the primes in the~$p_j$ series divides $C+1$, which implies either
that $C+1$ itself is prime, or that $C+1$ is composed of primes not in
the series.  But the latter is assumed impossible on the ground that the~$p_j$
series includes all primes; and the former is assumed impossible on
the ground that $C+1>C>p_N$, with~$p_N$ the greatest prime.  The
contradiction proves false the assumption that gave rise to it.  The
false assumption: that there were a last prime.

Thus there is no last prime.  No matter how great a prime number one
finds, a greater can always be found.  The supply of primes is
infinite.%
\footnote{\cite{Stepney}}

\index{Euclid (325--265~B.C.)}
\index{\emph{reductio ad absurdum}}
\index{proof!by contradiction}
\index{contradiction, proof by}
Attributed to the ancient geometer Euclid, the foregoing proof is a
classic example of mathematical \emph{reductio ad absurdum,} or as
usually styled in English, \emph{proof by contradiction.}%
\footnote{%
  \cite[appendix~1]{Sagan}%
  \cite[``Reductio ad absurdum,'' 02:36, 28 April 2006]{wikip}
}

\subsection{Compositional uniqueness}
\label{noth:220.20}
\index{composite number!compositional uniqueness of}
\index{integer!compositional uniqueness of}

\index{plausible assumption}
\index{prime factorization}
\index{factorization!prime}
Occasionally in mathematics, plausible assumptions can hide subtle
logical flaws.  One such plausible assumption is the assumption that
every positive integer has a unique \emph{prime factorization.}
It is readily seen that the first several positive integers---$1=()$,
$2=(2^1)$, $3=(3^1)$, $4=(2^2)$, $5=(5^1)$, $6=(2^1)(3^1)$, $7=(7^1)$,
$8=(2^3)$, \ldots---each have unique prime factorizations, but is this
necessarily true of all positive integers?

To show that it is true, suppose that it were not.%
\footnote{
  Unfortunately the author knows no more elegant proof than this, yet
  cannot even cite this one properly.  The author encountered the proof
  in some book over a decade ago.  The identity of that book is now long
  forgotten.
}
More precisely, suppose that there did exist positive integers
factorable each in two or more distinct ways, with the symbol~$C$
representing the least such integer.  Noting that~$C$ must be composite
(prime numbers by definition are each factorable only one way, like
$5=[5^1]$), let
\bqb
  C_p &\equiv& \prod_{j=1}^{N_p} p_j, \\
  C_q &\equiv& \prod_{k=1}^{N_q} q_k, \\
  C_p = C_q &=& C, \\
  p_j &\le& p_{j+1}, \\
  q_k &\le& q_{k+1}, \\
  p_1 &\le& q_1, \\
  N_p &>& 1, \\
  N_q &>& 1,
\eqb
where~$C_p$ and~$C_q$ represent two distinct prime factorizations of the
same number~$C$ and where the~$p_j$ and~$q_k$ are the respective
primes ordered from least to greatest.  We see that
\[
  p_j \neq q_k
\]
for any~$j$ and~$k$---that is, that the same prime cannot appear in both
factorizations---because if the same prime~$r$ did appear in both then
$C/r$ either would be prime (in which case both factorizations would be
$[r][C/r]$, defying our assumption that the two differed) or would
constitute an ambiguously factorable composite integer less than~$C$
when we had already defined~$C$ to represent the least such.  Among
other effects, the fact that $p_j \neq q_k$ strengthens the definition
$p_1\le q_1$ to read
\[
  p_1 < q_1.
\]

Let us now rewrite the two factorizations in the form
\bqb
  C_p &=& p_1 A_p, \\
  C_q &=& q_1 A_q, \\
  C_p = C_q &=& C, \\
  A_p &\equiv& \prod_{j=2}^{N_p} p_j, \\
  A_q &\equiv& \prod_{k=2}^{N_q} q_k,
\eqb
where~$p_1$ and~$q_1$ are the least primes in their respective
factorizations.  Since~$C$ is composite and since $p_1 < q_1$, we have
that
\bqb
  1 < p_1 < q_1 \le \sqrt C \le A_q < A_p < C,
\eqb
which implies that
\[
  p_1q_1 < C.
\]

The last inequality lets us compose the new positive integer
\[
  B = C - p_1q_1,
\]
which might be prime or composite (or unity), but which either way
enjoys a unique prime factorization because $B<C$, with~$C$ the least
positive integer factorable two ways.  Observing that some integer~$s$
which divides~$C$ necessarily also divides $C\pm ns$, we note that each
of~$p_1$ and~$q_1$ necessarily divides~$B$.  This means that~$B$'s
unique factorization includes both~$p_1$ and~$q_1$, which further means
that the product~$p_1q_1$ divides~$B$.  But if~$p_1q_1$ divides~$B$,
then it divides $B+p_1q_1=C$, also.

Let~$E$ represent the positive integer which results from dividing~$C$
\linebreak % bad break
by~$p_1q_1$:
\[
  E \equiv \frac{C}{p_1q_1}.
\]
Then,
\[
  \settowidth\tla{$p_1$}
  \begin{split}
    Eq_1 &= \frac{C}{\makebox[\tla][r]{$p_1$}} = A_p,\\
    Ep_1 &= \frac{C}{\makebox[\tla][r]{$q_1$}} = A_q.
  \end{split}
\]
That $Eq_1 = A_p$ says that~$q_1$ divides~$A_p$.  But $A_p<C$, so~$A_p$'s
prime factorization is unique---and we see above that~$A_p$'s
factorization \emph{does not include any~$q_k$,} not even~$q_1$.  The
contradiction proves false the assumption that gave rise to it.  The
false assumption: that there existed a least composite number~$C$
prime-factorable in two distinct ways.

Thus no positive integer is ambiguously factorable.  Prime
factorizations are always unique.

\index{flaw, logical}
\index{logical flaw}
\index{unsureness, logical}
\index{style}
\index{model}
\index{pure mathematics}
\index{professional mathematics}
\index{mathematics!professional or pure}
\index{mathematician!professional}
\index{professional mathematician}
We have observed at the start of this subsection that plausible
assumptions can hide subtle logical flaws.  Indeed this is so.
Interestingly however, the plausible assumption of the present
subsection has turned out absolutely correct; we have just had to do
some extra work to prove it.  Such effects are typical on the shadowed
frontier where applied shades into pure mathematics: with sufficient
experience and with a firm grasp of the model at hand, if you think that
it's true, then it probably is.  Judging when to delve into the
mathematics anyway, seeking a more rigorous demonstration of a
proposition one feels pretty sure is correct, is a matter of applied
mathematical style.  It depends on how sure one feels, and more
importantly on whether the unsureness felt is true uncertainty or is
just an unaccountable desire for more precise mathematical definition
(if the latter, then unlike the author you may have the right
temperament to become a professional mathematician).  The author does
judge the present subsection's proof to be worth the applied effort; but
nevertheless, when one lets logical minutiae distract him to too great a
degree, one admittedly begins to drift out of the applied mathematical
realm that is the subject of this book.

\subsection{Rational and irrational numbers}
\label{noth:220.30}
\index{number!rational}
\index{number!irrational}
\index{rational number}
\index{irrational number}

\index{ratio!fully reduced}
A \emph{rational number} is a finite real number expressible as a ratio
of integers%
\footnote{
  Section~\ref{alggeo:227} explains the $\in\mathbb Z$ notation.
}
\[
  x = \frac{p}{q},\ \ (p,q) \in \mathbb Z, \ q > 0.
\]
The ratio is \emph{fully reduced} if~$p$ and~$q$ have no prime factors
in common.  For instance,~$4/6$ is not fully reduced, whereas~$2/3$ is.

An \emph{irrational number} is a finite real number which is not
rational.  For example, $\sqrt{2}$ is irrational.  In fact any
$x=\sqrt{n}$ is irrational unless integral; there is no such thing as a
$\sqrt{n}$ which is not an integer but is rational.

To prove%
\footnote{
  A proof somewhat like the one presented here is found in
  \cite[appendix~1]{Sagan}.
}
the last point, suppose that there did
exist a fully reduced
\[
  x = \frac{p}{q} = \sqrt{n},\ \ (n,p,q) \in \mathbb Z,\ n>0,\ p>0,\ q>1.
\]
Squaring the equation, we have that
\[
  \frac{p^2}{q^2} = n,
\]
which form is evidently also fully reduced.  But if $q>1$, then the
fully reduced $n=p^2/q^2$ is not an integer as we had assumed that it
was.  The contradiction proves false the assumption which gave rise to
it.  Hence there exists no rational, nonintegral $\sqrt{n}$, as was to
be demonstrated.  The proof is readily extended to show that any
$x=n^{j/k}$ is irrational if nonintegral, the extension by writing that
$p^k/q^k=n^j$ then following similar steps as those this paragraph
outlines.

That's all the number theory the book treats; but in applied math, so
little will take you pretty far.  Now onward we go to other topics.

% ----------------------------------------------------------------------

\section[The existence and number of roots]{The
  existence and number of polynomial roots}
\label{noth:320}
\index{polynomial}
\index{root}

This section shows that an $N$th-order polynomial must have exactly~$N$
roots.

\subsection{Polynomial roots}
\label{noth:320.20}
\index{long division!by $z-\alpha$}

\index{remainder!after division by $z-\alpha$}
\index{remainder!zero}
Consider the quotient $B(z)/A(z)$, where
\bqb
  A(z) &=& z-\alpha, \\
  B(z) &=& \sum_{k=0}^N b_k z^k, \ \ N>0,\ b_N \neq 0, \\
  B(\alpha) &=& 0.
\eqb
In the long-division symbology of Table~\ref{alggeo:228:tbl-down},
\[
  B(z) = A(z)Q_0(z) + R_0(z),
\]
where $Q_0(z)$ is the quotient and $R_0(z)$, a remainder.  In this case
the divisor $A(z)=z-\alpha$ has first order, and as
\S~\ref{alggeo:228.20} has observed, first-order divisors leave
zeroth-order, constant remainders $R_0(z) = \rho$.  Thus substituting
yields that
\[
  B(z) = (z-\alpha)Q_0(z) + \rho.
\]
When $z=\alpha$, this reduces to
\[
  B(\alpha) = \rho.
\]
But $B(\alpha) = 0$ by assumption, so
\[
  \rho = 0.
\]
Evidently the division leaves no remainder~$\rho$, which is to say that
\emph{$z-\alpha$ exactly divides every polynomial $B(z)$ of which
$z=\alpha$ is a root.}\footnote{%
  See also~\cite[\S~5.86]{Shilov}, which reaches the same result in
  nearly the same way.%
}

Note that if the polynomial $B(z)$ has order~$N$, then the
quotient~$Q(z) = B(z)/(z-\alpha)$ has exactly order~$N-1$.  That is, the
leading,~$z^{N-1}$ term of the quotient is never null.  The reason is
that if the leading term were null, if $Q(z)$ had order less than $N-1$,
then $B(z) = (z-\alpha)Q(z)$ could not possibly have order~$N$ as we
have assumed.

\subsection{The fundamental theorem of algebra}
\label{noth:320.30}
\index{algebra!fundamental theorem of}
\index{fundamental theorem of algebra}
\index{polynomial!of order~$N$ having~$N$ roots}

The \emph{fundamental theorem of algebra}
holds that any polynomial $B(z)$ of order~$N$ can be factored
\bq{noth:320:50}
  B(z) = \sum_{k=0}^{N} b_kz^k = b_N \prod_{j=1}^{N} (z-\alpha_j),
  \ \ b_N\neq 0,
\eq
where the~$\alpha_k$ are the~$N$ roots of the polynomial.%
\footnote{
  Professional mathematicians typically state the theorem in a slightly
  different form.  They also usually prove it in rather a different
  way.\ \cite[chapter~10, Prob.~74]{Hildebrand}\cite[\S~5.85]{Shilov}
}

To prove the theorem, it suffices to show that all polynomials of order
$N>0$ have at least one root; for if a polynomial of order~$N$ has a
root~$\alpha_N$, then according to \S~\ref{noth:320.20} one can divide
the polynomial by $z-\alpha_N$ to obtain a new polynomial of order
$N-1$.  To the new polynomial the same logic applies: if it has at least
one root $\alpha_{N-1}$, then one can divide \emph{it} by $z-\alpha_{N-1}$ to
obtain yet another polynomial of order $N-2$; and so on, one root
extracted at each step, factoring the polynomial step by step into the
desired form $b_N \prod_{j=1}^{N} (z-\alpha_j)$.

\index{locus}
\index{polynomial!having at least one root}
It remains however to show that there exists no polynomial $B(z)$ of
order $N>0$
lacking roots altogether.  To show that there is no such polynomial,
consider the locus%
\footnote{
  A \emph{locus} is the geometric collection of points which satisfy
  a given criterion.  For example, the locus of all points in a plane at
  distance~$\rho$ from a point~$O$ is a circle; the locus of all points
  in three-dimensional space equidistant from two points~$P$ and~$Q$ is
  a plane; etc.
}
of all $B(\rho e^{i\phi})$ in the Argand range plane
(Fig.~\ref{alggeo:225:fig}), where $z=\rho e^{i\phi}$,~$\rho$ is held
constant, and~$\phi$ is variable.  Because $e^{i(\phi+n2\pi)} =
e^{i\phi}$ and no fractional powers of~$z$ appear
in~(\ref{noth:320:50}), this locus forms a closed loop.  At very large~$\rho$,
the~$b_Nz^N$ term dominates $B(z)$, so the locus there evidently
has the general character of $b_N\rho^N e^{iN\phi}$.  As such, the locus
is nearly but not quite a circle at radius~$b_N\rho^N$ from the Argand
origin $B(z)=0$, revolving~$N$ times at that great distance before
exactly repeating.  On the other hand, when $\rho = 0$ the entire locus
collapses on the single point $B(0)=b_0$.

Now consider the locus at very large~$\rho$ again, but this time let~$\rho$
slowly shrink.  Watch the locus as~$\rho$ shrinks.  The locus is
like a great string or rubber band, joined at the ends and looped in~$N$
great loops.  As~$\rho$ shrinks smoothly, the string's shape changes
smoothly.  Eventually~$\rho$ disappears and the entire string collapses
on the point $B(0)=b_0$.  Since the string originally has looped~$N$
times at great distance about the Argand origin, but at the end has
collapsed on a single point, then at some time between it must have
swept through the origin and every other point within the original
loops.  After all, $B(z)$ is everywhere differentiable, so the string
can only \emph{sweep} as~$\rho$ decreases; it can never skip.  The
Argand origin lies inside the loops at the start but outside at the end.
If so, then the values of~$\rho$ and~$\phi$ precisely where the string
has swept through the origin by definition constitute a root $B(\rho
e^{i\phi}) = 0$.  Thus as we were required to show, $B(z)$ does have at
least one root, which observation completes the applied demonstration of
the fundamental theorem of algebra.

\index{winding}
(The purist might object that we have failed to prove that some trick
does not exist whereby the~$N$ loops smoothly collapsed without passing
through \emph{every} point within.  The applicationist might reply that,
on an applied level, such an objection were less than wholly serious,
but anyway, here is at least one formal tactic by which one could rule
out the possibility of a trick: as~$\rho$ shrinks, observing
$\arg\{B[\rho e^{i\phi}]-b_0\}$ as a function of~$\phi$, keep count of
the net number of times the loops wind counterclockwise about the
point~$B[0]=b_0$ as, given a particular value of~$\rho$, $\phi$ is let
to sweep the domain $-2\pi/2 < \phi \le 2\pi/2$.  To fill details is
left as an exercise to the interested reader.)

\index{quadratic expression}
\index{cubic expression}
\index{quartic expression}
\index{quintic expression}
The fact that the roots exist is one thing.  Actually finding the roots
numerically is another matter.  For a quadratic (second order)
polynomial,~(\ref{alggeo:240:quad}) gives the roots.  For cubic (third
order) and quartic (fourth order) polynomials, formulas for the roots
are known (see chapter~\ref{cubic}) though seemingly not so for quintic
(fifth order) and higher-order polynomials;%
\footnote{\label{noth:320:fn20}%
  In a celebrated theorem of pure mathematics \cite[``Abel's
  impossibility theorem'']{EWW-web}, it is said to be shown that no such
  formula even exists, given that the formula be constructed according
  to certain rules.  Undoubtedly the theorem is interesting to the
  professional mathematician, but to the applied mathematician it
  probably suffices to observe merely that no such formula is known.
}
but the Newton-Raphson iteration (\S~\ref{drvtv:270}) can be used to
locate a root numerically in any case.  The Newton-Raphson is used to
extract one root (\emph{any} root) at each step as described above,
reducing the polynomial step by step until all the roots are found.

The reverse problem, finding the polynomial given the roots, is
much easier: one just multiplies out $\prod_j (z-\alpha_j)$, as
in~(\ref{noth:320:50}).

Incidentally, the reverse problem and its attendant multiplication show
that an $N$th-order polynomial can have no other roots than the~$N$
roots $z=\alpha_j$.  Reason: the product $\prod_j (z-\alpha_j)$ is
nonzero for all other~$z$.

% ----------------------------------------------------------------------

\section{Addition and averages}
\label{noth:420}

This section discusses the two basic ways to add numbers and the three
basic ways to calculate averages of them.

\subsection{Serial and parallel addition}
\label{noth:420.10}
\index{parallel addition}
\index{addition!parallel}
\index{serial addition}
\index{series addition}
\index{addition!serial}
\index{addition!series}

\index{mason}
Consider the following problem.  There are three masons.  The
strongest and most experienced of the three, Adam, lays~60
bricks per hour.%
\footnote{
  The figures in the example are in decimal notation.
}
Next is Brian who lays~45.  Charles is new; he lays
only~30.  Given eight hours, how many bricks can the three men lay?
Answer:
\[
  (8\ \mbox{hours})( 60 + 45 + 30\ \mbox{bricks per hour} )
  = 1080\ \mbox{bricks}.
\]
Now suppose that we are told that Adam can lay a brick every~60 seconds;
Brian, every~80 seconds; Charles, every~120 seconds.  How much time do the
three men need to lay~1080 bricks?  Answer:
\bqb
  \frac{1080\ \mbox{bricks}}{
    \left(\frac{1}{60} +
    \frac{1}{80} +
    \frac{1}{120}\right) \:\mbox{bricks per second}
  } &=& \mbox{28,800 \mbox{seconds}}
  \left(\frac{1\ \mbox{hour}}{3600\ \mbox{seconds}}\right)
  \\ &=& 8\ \mbox{hours}.
\eqb
The two problems are precisely equivalent.  Neither is stated in simpler
terms than the other.  The notation used to solve the second is less
elegant, but fortunately there exists a better notation:
\[
  (1080\ \mbox{bricks})(60 \,\|\, 80 \,\|\, 120\ \mbox{seconds per brick})
  = 8\ \mbox{hours},
\]
where
\[
  \frac{1}{
    60 \,\|\, 80 \,\|\, 120
  } =
  \frac{1}{60} +
  \frac{1}{80} +
  \frac{1}{120}.
\]

The operator~$\|$ is called the \emph{parallel addition} operator.  It
works according to the law
\bq{noth:420:10}
  \frac{1}{
    a \,\|\, b
  } =
  \frac{1}{a} +
  \frac{1}{b},
\eq
where the familiar operator~$+$ is verbally distinguished from the~$\|$
when necessary by calling the~$+$ the \emph{serial addition} or
\emph{series addition} operator.  With~(\ref{noth:420:10}) and a bit of
arithmetic, the several parallel-addition identities of
Table~\ref{noth:420:tbl-plad} are soon derived.
\begin{table}
  \caption{Parallel and serial addition identities.}
  \label{noth:420:tbl-plad}
  \[
    \renewcommand{\arraystretch}{2.0}
    \br{rclcrcl}
      \ds\frac{1}{a \,\|\, b} &=& \ds\frac{1}{a} + \frac{1}{b} &\ \ \ &
      \ds\frac{1}{a + b} &=& \ds\frac{1}{a} \,\|\, \frac{1}{b} \\
      \ds a \,\|\, b &=& \ds \frac{ab}{a+b} &\sh{1.0}&
      \ds a + b &=& \ds \frac{ab}{a\,\|\,b} \\
      \ds a \,\|\, \frac{1}{b} &=& \ds\frac{a}{1+ab} &\sh{1.0}&
      \ds a + \frac{1}{b} &=& \ds\frac{a}{1\,\|\,ab} \\
      \ds a \,\|\, b &=& \ds b \,\|\, a &\sh{1.0}&
      \ds a + b &=& \ds b + a \\
      \ds a \,\|\, (b\,\|\,c) &=& \ds (a\,\|\,b) \,\|\,c &\sh{1.0}&
      \ds a + (b+c) &=& \ds (a+b) + c \\
      \ds a \,\|\, \infty = \ds \infty \,\|\, a &=& \ds a &\sh{1.0}&
      \ds a + 0 = \ds 0 + a &=& \ds a \\
      \ds a \,\|\, (-a) &=& \ds \infty &\sh{1.0}&
      \ds a + (-a) &=& \ds 0 \\
      \ds (a)(b\,\|\,c) &=& \ds ab \,\|\, ac &\sh{1.0}&
      \ds (a)(b+c) &=& \ds ab + ac \\
      \ds \frac{1}{\sum_k\|\, a_k} &=& \ds \sum_k \frac{1}{a_k} &\sh{1.0}&
      \ds \frac{1}{\sum_k a_k} &=& \ds \sum_k\|\, \frac{1}{a_k}
    \er
  \]
\end{table}

The writer knows of no conventional notation for parallel sums of
series, but suggests that the notation which appears in the table,
\[
  \sum_{k=a}^{b}\|\,f(k) \equiv f(a) \,\|\, f(a+1) \,\|\, f(a+2) \,\|\, \cdots \,\|\, f(b),
\]
might serve if needed.

\index{iff}
Assuming that none of the values involved is negative, one can readily
show that%
\footnote{
  The word \emph{iff} means, ``if and only if.''
}
\bq{noth:420:28}
  a\,\|\,x \le b\,\|\,x \ \ \mbox{iff}\ \ a \le b.
\eq
This is intuitive.  Counterintuitive, perhaps, is that
\bq{noth:420:29}
  a\,\|\,x \le a.
\eq

Because we have all learned as children to count in the sensible manner
$1,2,3,4,5,\ldots$---rather than as $1,\frac 1 2,\frac 1 3,\frac 1 4,
\frac 1 5,\ldots$---serial addition ($+$) seems more natural than
parallel addition ($\|$) does.  The psychological barrier is hard to
breach, yet for many purposes parallel addition is in fact no less
fundamental.  Its rules are inherently neither more nor less
complicated, as Table~\ref{noth:420:tbl-plad} illustrates; yet outside
the electrical engineering literature the parallel addition notation is
seldom seen.%
\footnote{
  In electric circuits, loads are connected in parallel as often as, in
  fact probably more often than, they are connected in series.  Parallel
  addition gives the electrical engineer a neat way of adding the
  impedances of parallel-connected loads.
}
Now that you have seen it, you can use it.  There is profit in learning
to think both ways.  (Exercise: counting from zero serially goes
$0,1,2,3,4,5,\ldots$; how does the parallel analog go?)%
\footnote{\cite[eqn.~1.27]{Sedra/Smith}}

\index{parallel subtraction}
\index{subtraction!parallel}
Convention brings no special symbol for parallel subtraction, incidentally.
One merely writes
\[
  a\,\|\,(-b),
\]
which means exactly what it appears to mean.

\subsection{Averages}
\label{noth:420.20}
\index{average}
\index{mean}

%\index{productivity}
%\index{businessman}
%\index{contract}
Let us return to the problem of the preceding section.  Among the three
masons, what is their average productivity?  The answer depends on how you
look at it.  On the one hand,
\[
  \frac{\left(60 + 45 + 30\right)\:\mbox{bricks per hour}}{3}
  = 45\ \mbox{bricks per hour}.
\]
On the other hand,
\[
  \frac{\left(60 + 80 + 120\right)\:\mbox{seconds per brick}}{3}
  = 86{\textstyle\frac{2}{3}}\ \mbox{seconds per brick}.
\]
These two figures are not the same.  That is,
$1/(86{\textstyle\frac{2}{3}}\ \mbox{seconds per brick}) \neq
45\ \mbox{bricks per hour}$.  Yet both figures are valid.  Which
figure you choose depends on what you want to calculate.
Will the masons lay bricks at the same time in different parts of the
wall?  Then choose the $45\ \mbox{bricks per hour}$.
Will the masons lay bricks at different times in the same part of the
wall?  Then, especially if the masons have each equal numbers of bricks
to lay, choose the $86{\textstyle\frac{2}{3}}\ \mbox{seconds per
brick}$.

%\index{United States}
%\index{American}
%\index{House of Representatives}
%\index{Representatives, House of}
%\index{representative}
%\index{seat}
%\index{apportionment}
%\index{Constitution of the United States}
%\index{statute}
%\index{population}
%\index{republic}
When it is unclear which of the two averages is more appropriate, a
third average is available, the \emph{geometric mean}
\[
  \left[(60)(45)(30)\right]^{1/3} \ \mbox{bricks per hour}.
\]
The geometric mean does not have the problem either of the two
averages discussed above has.  The inverse geometric mean
\[
  \left[(60)(80)(120)\right]^{1/3} \ \mbox{seconds per brick}
\]
implies the same average productivity.  The mathematically savvy
sometimes prefer the geometric mean over either of the others for this
reason.
%\footnote{
%  The writer, an American, was recently, pleasantly surprised to learn
%  that the formula his country's relevant federal statute stipulates to
%  implement the Constitutional requirement that representation in the
%  country's federal House of Representatives be apportioned by
%  population actually, properly always apportions the next available
%  seat in the House to the state whose \emph{geometric} mean of
%  population per representative before and after apportionment would be
%  greatest.  Now, admittedly, the Republic does not rise or fall on the
%  niceties of averaging techniques; but, nonetheless, some American who
%  knew his mathematics was involved in the drafting of that statute!
%}
% On further investigation, it appears that the statute does not detail
% the method, but the Census Bureau does??  See Title 2, Chapter 1,
% U.S. Code.

\index{mean!arithmetic}
\index{arithmetic mean}
\index{mean!geometric}
\index{geometric mean}
\index{harmonic mean}
\index{mean!harmonic}
Generally, the \emph{arithmetic, geometric} and \emph{harmonic
means} are defined to be
\bqa
  \mu &\equiv& \frac{\sum_k w_kx_k}{\sum_k w_k} =
  \left(\sum_k\|\, \frac{1}{w_k}\right) \left(\sum_k w_kx_k\right),
  \label{noth:420:31}\\
  \mu_\Pi &\equiv& \left[ \prod_j x_j^{w_j} \right]^{1/\sum_k w_k}
  = \left[ \prod_j x_j^{w_j} \right]^{\sum_k\|\, 1/w_k},
  \label{noth:420:32}\\
  \mu_\| &\equiv& \frac{\sum_k\|\, x_k/w_k}{\sum_k\|\, 1/w_k} =
  \left(\sum_k w_k\right) \left(\sum_k\|\, \frac{x_k}{w_k}\right),
  \label{noth:420:33}
\eqa
where the~$x_k$ are the several samples and the~$w_k$ are weights.
For two samples weighted equally, these are
\bqa
  \mu &=& \frac{a+b}{2}, \label{noth:420:36}\\
  \mu_\Pi &=& \sqrt{ab}, \label{noth:420:37}\\
  \mu_\| &=& 2 (a\,\|\,b). \label{noth:420:38}
\eqa

\index{proving backward}
If $a\ge 0$ and $b\ge 0$, then, by successive steps,%
\footnote{\label{noth:420:85}%
  The steps are logical enough, but the motivation behind them remains
  inscrutable until the reader realizes that the writer originally
  worked the steps out backward with his pencil, from the last step to
  the first.  Only then did he reverse the order and write the steps
  formally here.  The writer had no idea that he was supposed to start
  from $0 \le (a-b)^2$ until his pencil working backward showed him.
  ``Begin with the end in mind,'' the saying goes.  In this case the
  saying is right.

  The same reading strategy often clarifies inscrutable math.  When you
  can follow the logic but cannot understand what could possibly have
  inspired the writer to conceive the logic in the first place, try
  reading backward.
}%
\[
  \renewcommand{\arraystretch}{2.0}
  \br{rcccl}
    \ds 0 &\le& \multicolumn{3}{l}{\ds (a-b)^2,} \\
    \ds 0 &\le& \multicolumn{3}{l}{\ds a^2-2ab+b^2,} \\
    \ds 4ab &\le& \multicolumn{3}{l}{\ds a^2+2ab+b^2,} \\
    \ds 2\sqrt{ab} &\le& \multicolumn{3}{l}{\ds a+b,} \\
    \ds \frac{2\sqrt{ab}}{a+b} &\le& \ds 1 &\le& \ds \frac{a+b}{2\sqrt{ab}}, \\
    \ds \frac{2ab}{a+b} &\le& \ds \sqrt{ab} &\le& \ds \frac{a+b}{2}, \\
    \ds 2 (a\,\|\,b) &\le& \ds \sqrt{ab} &\le& \ds \frac{a+b}{2}.
  \er
\]
That is,
\bq{noth:420:40}
  \mu_\| \le \mu_\Pi \le \mu.
\eq
The arithmetic mean is greatest and the harmonic mean, least; with the
geometric mean falling between.

Does~(\ref{noth:420:40}) hold when there are several nonnegative samples
of various nonnegative weights?  To show that it does, consider the case
of $N=2^m$ nonnegative samples of equal weight.  Nothing prevents one
from dividing such a set of samples in half, considering each subset
separately, for if~(\ref{noth:420:40}) holds for each subset
individually then surely it holds for the whole set (this is so because the
average of the whole set is itself the \emph{average of the two subset
averages,} where the word ``average'' signifies the arithmetic,
geometric or harmonic mean as appropriate).  But each subset can further
be divided in half, then each subsubset can be divided in half again,
and so on until each smallest group has two members only---in which case
we already know that~(\ref{noth:420:40}) obtains.  Starting there and
recursing back, we have that~(\ref{noth:420:40}) obtains for the entire
set.  Now consider that a sample of any weight can be approximated
arbitrarily closely by several samples of weight $1/2^m$, provided that~$m$
is sufficiently large.  By this reasoning,~(\ref{noth:420:40}) holds
for any nonnegative weights of nonnegative samples, which was to be
demonstrated.

