# Companion Matrix

The companion matrix of the monic polynomial $p(t)=c_0 + c_1 t + \dots + c_{n-1}t^{n-1} + t^n$ is the square matrix defined as:

$C(p)=\begin{bmatrix} 0 & 0 & \dots & 0 & -c_0 \\ 1 & 0 & \dots & 0 & -c_1 \\ 0 & 1 & \dots & 0 & -c_2 \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ 0 & 0 & \dots & 1 & -c_{n-1} \\ \end{bmatrix}.$

$p(t)$ is also the characteristic polynomial for the matrix. The eigenvalues for the above matrix are the roots of $p(t)$.

I found this to be quite an interesting way to find the roots of any equation, with a great deal of ease! The corresponding MATLAB function is compan.

$\mathbf{F} = \textrm{compan}([1 -1 -1]) = \begin{pmatrix} 1 & 1\\ 1 & 0 \\\end{pmatrix}$

$\begin{pmatrix} F_{k+2} \\ F_{k+1} \\ \end{pmatrix} = \begin{pmatrix} 1 & 1\\ 1 & 0 \\\end{pmatrix} \begin{pmatrix} F_{k+1} \\ F_{k} \\ \end{pmatrix}$

Here, $F_k$ is the kth; Fibonacci number.

# The Man Who Knew Infinity, by Robert Kanigel

No wonder, this book is on on the great Donald Knuth’s reading list!

What a wonderful book this is… full of Ramanjuan’s exploits, told with an exquisite touch of admiration for Ramanujan and in wonderful detail. I’ve been wanting to review this book, but found a wonderful review elsewhere, which more than states what I would have.

Let me just put forth a few excerpts from the review first:

When it comes to biographies, I personally find it a delight when the author is overwhelmed by the person he is writing about, because it is then that you get to see hidden visages of the person. Robert Kanigel’s book is replete with such engaging depictions..“When he thought hard, his face scrunched up, his eyes narrowed into a squint. when he figured something out, he sometimes seemed to talk to himself, smile, shake his head with pleasure. When he made a mistake, too impatient to lay down his slate-pencil, he twisted his forearm towards his body in a single fluid motion and used his elbow, now aimed at the slate, as an eraser…”Ramanujan used a slate for working out his mind-boggling results and began entering the concise results themselves in notebooks. These notebooks have nothing short of a cult status in mathematical circles. They have helped pure mathematics branch off into stunning new fields, inspired thousands of research papers and are still being plumbed for their depth after a hundred years.

Hardy paid the ultimate tribute to Ramanujan during one of his lectures. He summarized, “Suppose that we rate mathematicians on the basis of pure talent on a scale from 0 to 100, I give myself a modest 25, Littlewood 30, the great Hilbert 80 and Ramanujan 100.

Apart from Ramanujan, this book also adequately addresses the Hardy, with a whole chapter devoted to him. It’s quite funny to read about Hardy’s love of cricket, his atheism, and above all his passion for math.In a postcard to his friend, Hardy (during the 1920s) listed six New Year wishes:
(1) prove the Riemann hypothesis;
(2) make 211 not out in the fourth innings of the last Test Match at Oval;
(3) find an argument for the non-existence of God which shall convince the general public;
(4) be the first man at the top of Mount Everest;
(5) be proclaimed the first president of the USSR or of Great Britain and Germany;
(6) murder Mussolini.

I’ll try and add some more snippets from the book, but be assured that it is a book that must adorn the library of any math enthusiast!

# Bailey-Borwein-Plouffe formula

The Bailey-Borwein-Plouffe formula (BBP formula) provides a spigot algorithm for the computation of the nth digit of $\pi$. The original BBP $\pi$ summation formula was found in 1995 by Plouffe using PSLQ. It is

$\pi = \sum_{k = 0}^{\infty} \frac{1}{16^k} \left( \frac{4}{8k + 1} - \frac{2}{8k + 4} - \frac{1}{8k + 5} - \frac{1}{8k + 6}\right)$

Amazingly, this formula is a digit-extraction algorithm for $\pi$ in base 16.

It appears that there is a digit extraction algorithm even for e!

# Most Beautiful Math Equations

This is a (subset of the) list of the most beautiful math equations ever derived, according to Ed Pegg Jr and Eric Weisstein (Mathworld). You can check the whole list here.

Archimedes’ Recurrence Formula
Let $a_n$ and $b_n$ be the perimeters of the circumscribed and inscribed n-gon and $a_{2n}$ and $b_{2n}$ the perimeters of the circumscribed and inscribed 2n-gon. Then
$a_{2n}=\frac{2 a_n b_n}{a_n+b_n}, \quad b_{2n}=\sqrt{a_{2n}b_n}, \quad a_\infty=b_\infty$
Successive application gives the Archimedes algorithm, which can be used to provide successive approximations to $\pi$.

Euler Formula
$e^{i\pi}+1=0$
This equation connects the fundamental numbers i, $\pi$, e, 1, and 0, the fundamental operations $+$, $\times$, and exponentiation, the most important relation $=$, and nothing else. Gauss is reported to have commented that if this formula was not immediately obvious, the reader would never be a first-class mathematician.

Euler-Mascheroni Constant
The Euler-Mascheroni constant gamma, sometimes also called Euler’s constant’ or the Euler constant’, is defined as the limit of the sequence
$\gamma = \lim_{n \rightarrow \infty}\left(\sum_{k=1}^n \frac{1}{k}-\ln n\right)$

$\gamma$ has the numerical value 0.577215664901532860606512090082402431042…

Riemann Hypothesis
The Riemann hypothesis is a deep mathematical conjecture which states that the non-trivial Riemann zeta function zeros, i.e., the values of s other than -2, -4, -6, $\ldots$ such that $\zeta(s)=0$ (where $\zeta(s)$ is the Riemann zeta function) all lie on the “critical line” $\sigma=\mathbb{R}[s]=1/2$ (where $\mathbb R[s]$ denotes the real part of s).

The Riemann zeta-function $\zeta(s)$ is the function of a complex variable s initially defined by the following infinite series:

$\zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}$

The Riemann hypothesis can be stated as:
$\zeta(\alpha+i\beta)=0$ and $\beta \neq 0$ implies $\alpha=\frac{1}{2}$.

Gaussian Integral
The Gaussian integral, also called the probability integral is the integral of the one-dimensional Gaussian function over $(-\infty,\infty)$

$\int_{-\infty}^{\infty}{e^{-x^2}dx} = \sqrt{\pi}$

# totient?

Just thought of starting a blog on math. I expect to put hear real arbit stuff on math that interests me and other math enthusiasts too!

Why totient? Basically wanted the title to be some glorious mathematical symbol. Then thought of functions. The totient function certainly seemed the most exotic one. Mustn’t everything beautiful in math have something to do with Euler or Gauss? I chose Euler for the moment, but I am sure to have interesting posts on all the other geniuses like Gauss, Fermat, Galois or Ramanujan, to name a very few, and maybe even Knuth(!) or Wiles.

But the question remains — “Did Euler ever envision applications in cryptography for his seemingly innocuous function?”.

Now to the introduction of the totient function:

In number theory, the totient $\phi(n)$ of a positive integer n is defined to be the number of positive integers less than or equal to n that are coprime to n.