Calculating the Inverse of a matrix. $A)$
Solve:
$x_1-x_2=1$
$-x_1+2x_2-x_3=0$
$\vdots$
$-x_{99}+2x_{100}=0$
$B$)Deduce the inverse of 
A=\begin{pmatrix}
        1 & -1 & 0 & \cdots& \cdots & 0   \\
        -1 & 2 & -1 & \ddots& \cdots  &\vdots\\
        0 & -1 & 2 &-1& \ddots& \vdots\\
        \vdots & \ddots & \ddots & \ddots &\ddots&0\\
        \vdots & \cdots & \ddots & \ddots &2&-1\\
        0 & \cdots & \cdots & 0 &-1&2\\
\end{pmatrix}
I've solved the first part and got:
$x_1=100$
$x_2=99$
$\vdots$
$x_{100}=1$ (Correct me if I'm wrong)
For the part B , I'm not sure how to approach it although I'm quite sure the first column of $A^{-1}$ should contain $x_1$ till $x_{100}$ in this order , however I have no idea on how to fill the other columns.
If anyone could help me or give me hints , I would be grateful.
Thanks in advance.
 A: Realize that what you calculated is a solution to $Ax=e_1$. If you are curious about a solution for $e_2$ set the first equation to 0, i.e. $x_1-x_2=0$ and the second to 1, yielding the same system of equation just one less variable (cause $x_1=x_2$). Then progress similarly and when you (conceptually) solve all, you have the solutions $A\mathbf{x}_i=e_i$.
A: I agree with you and your calculations of $\{x_1,\cdots, x_{100}\}$
And the first column of $A^{-1}$ is $\begin{bmatrix} x_1\\ \vdots\\x_{100} \end{bmatrix}$
The second column, the every row (except the first) will multiply by  $\begin{bmatrix} 1\\-1\\0 \\\vdots\\0 \end{bmatrix}$ and result in $0.$
The second column is, $\begin{bmatrix} x_1-1\\x_2\\x_3\\ \vdots\\x_{100} \end{bmatrix}$
And from extending along I get:
$\begin{bmatrix} 
100&99&98 &\cdots& 1\\
99&99&98 &\cdots& 1\\
98&98&98&\cdots&1\\
\vdots&&\ddots&&\vdots\\
1&&\cdots&&1\end{bmatrix}$
A: Here is a "brute-force" method. 
Looking at some small dimension examples, it is clear how to construct the inverse. It is good to notice that $A$ is symmetric, and so its inverse is also symmetric. 
Let 
$$
B=\begin{bmatrix}
100&99&98&97&\cdots&2&1\\
99&99&98&97&\cdots&2&1\\
98&98&98&97&\cdots&2&1\\
97&97&97&97&\cdots&2&1\\
\vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\
1&1&1&1&\cdots&1
\end{bmatrix}
$$
Now, when we do $BA$, we need to look at the three kinds of columns $A$ has: 


*

*against the first colunm:
$$
\begin{bmatrix} 100&99\end{bmatrix}\begin{bmatrix}1\\-1\end{bmatrix}=1,
$$
and
$$
\begin{bmatrix} m&m\end{bmatrix}\begin{bmatrix}1\\-1\end{bmatrix}=0,
$$
so $(BA)_{k1}=\delta_{k1}$. 

*against columns $2$ to $99$: the $j^{\rm th}$ column of $A$ has $-1,2,-1$ starting at row $j-1$. The $k^{\rm th}$ row of $B$ has $101-k$ in the first $k$ columns, and then starts decreasing one by one. So, for $j> k$, 
$$
(BA)_{kj}=\begin{bmatrix}101-k&101-k-1&101-k-2\end{bmatrix}\begin{bmatrix}-1\\2\\-1\end{bmatrix}=0.
$$
For $j<k$, the entry is the same by symmetry. For $j=k$, 
$$
(BA)_{kk}=\begin{bmatrix} 101-k&101-k&101-k-1\end{bmatrix}\begin{bmatrix}-1\\2\\-1\end{bmatrix} =1
$$
So $(BA)_{kj}=\delta_{kj}$.

*Against column $100$: when $k<100$, $j=100$, 
$$
(BA)_{kj}=\begin{bmatrix} 2&1\end{bmatrix}\begin{bmatrix} -1\\2\end{bmatrix}=0.
$$
And
$$
(BA)_{100,100}=\begin{bmatrix} 1&1\end{bmatrix}\begin{bmatrix} -1\\2\end{bmatrix}=1.
$$
So $(BA)_{k,100}=\delta_{k,100}$. 
In summary, $BA=I$. 
A: $\begin{pmatrix} 
1 & -1 \\
-1 & 2 
\end{pmatrix}^{-1}=\begin{pmatrix} 
2 & 1 \\
1 & 1 
\end{pmatrix}$
$\begin{pmatrix} 
1 & -1 & 0\\
-1 & 2 & -1\\
0 & -1 & 2
\end{pmatrix}^{-1}=\begin{pmatrix} 
3 & 2 & 1\\
2 & 2 & 1\\
1 & 1 & 1
\end{pmatrix}$
$\begin{pmatrix} 
1 & -1 & 0 & 0\\
-1 & 2 & -1 & 0\\
0 & -1 & 2 & -1\\
0 & 0 & -1 & 2
\end{pmatrix}^{-1}=\begin{pmatrix} 
4 & 3 & 2 & 1\\
3 & 3 & 2 & 1\\
2 & 2 & 2 & 1\\
1 & 1 & 1 & 1
\end{pmatrix}$
Can you guess the inverse of $A$?
