TITLE: inverse of a tridiagonal matrix
QUESTION [5 upvotes]: Let 
$${A_{n \times n}} = \left[ {\begin{array}{*{20}{c}}
{-2}&{1}&{}&{}&{}\\
{1}&{-2}&{1}&{}&{}\\
{}&{1}&{\ddots}&{\ddots}&{}\\
{}&{}&{\ddots}&{\ddots}&{1}\\
{}&{}&{}&{1}&{-2}
\end{array}} \right]$$
be a tridiagonal matrix. How we can prove that its inverse is the matrix $B=(b_{ij})$ where
$$b_{ij}=-\frac{i(n+1-j)}{n+1} \; ,\quad i\leq j.$$

REPLY [3 votes]: As Henning points out, checking that two matrices are inverses is much easier than computing an inverse; all we need to do is find the product of the matrices.  Also, note that your definition of $B$ is incomplete, but we can deduce the rest since $B$ must be symmetric.
By definition, the $i,j$ of the matrix product $AB$ is given by
$$
[AB](i,j) = \sum_{k=1}^n a_{ik}b_{kj}
$$
in the case of $i=1$, we have
$$
[AB](1,j) = \sum_{k=1}^n a_{1k}b_{kj} = \\
\begin{cases}
-2\cdot\frac{1(n+1 - j)}{n+1}
+ 1 \cdot \frac{2(n + 1 - j)}{n+1} & j \geq 2\\
-2 \cdot \frac{1(n+1-j)}{n+1}
+ 1  \cdot \frac{j(n + 1 - 2)}{n+1} & j=1
\end{cases} = \delta_{ij}
$$
We can repeat a similar computation for the cases $2 \leq i \leq n-1$ and $i = n$.

Alternatively: we can find the characteristic polynomial of $A$ using induction (Pavel's method).  From there, we could find the inverse using the Cayley Hamilton theorem.