Finding the inverse matrix I have these matrices:
Find the inverse matrices:
\begin{bmatrix}
1 & 1 & 0& 0&\dots & 0& 0\\0 & 1 & 1& 0&\dots & 0& 0  \\0 & 0 & 1& 1&\dots & 0& 0 \\\dots & \dots & \dots& \dots&\dots & \dots& \dots\\0 & 0 & 0& 0&\dots & 1& 1 \\0 & 0 & 0& 0&\dots & 0& 1 \\
\end{bmatrix}
\begin{bmatrix}
1 & a & a^2& a^3&\dots & a^{n-1}& a^n\\0 & 1 & a& a^2&\dots & a^{n-2}& a^{n-1}  \\0 & 0 & 1& a&\dots & a^{n-3}& a^{n-2} \\\dots & \dots & \dots& \dots&\dots & \dots& \dots\\0 & 0 & 0& 0&\dots & 1& a \\0 & 0 & 0& 0&\dots & 0& 1 \\
\end{bmatrix}
These are examples of exam problems I will be facing soon. I want to understand how to solve these type of problems
PS I am new in math and I couldn't find any better resourse if you can link me a good source for linear algebra, that would be great.
 A: This is a start to obtain a general proof:
For the first matrix $A$: Let $a_{ij}$ denote elements of $A$, $b_{ij}$ elements of its inverse. Then $$\sum_{k=1}^n a_{ik}b_{ki}=1$$$$\sum_{k=1}^n a_{ik}b_{kj}=0 \quad(i\neq j)$$
And $$b_{n,n}=1$$
$a_{ij}=1$ when $j=i$ or $j=i+1$ and $0$ otherwise, hence:
$$b_{i,i}+b_{i+1,i}=1$$
$$b_{i,j}+b_{i+1,j}=0$$
For $i=n-1$ and $j=n$ we have $$b_{n-1,n}+b_{n,n}=0$$ $$b_{n-1,n}=-1$$
etc...
A: Using the usual algorithm, you can calculate that $$\begin{pmatrix}
1&1&0&0&\mid&1&0&0&0\\
0&1&1&0&\mid&0&1&0&0\\
0&0&1&1&\mid&0&0&1&0\\
0&0&0&1&\mid&0&0&0&1
\end{pmatrix}\xrightarrow{R_3\rightarrow R_3-R_4}\begin{pmatrix}
1&1&0&0&\mid&1&0&0&0\\
0&1&1&0&\mid&0&1&0&0\\
0&0&1&0&\mid&0&0&1&-1\\
0&0&0&1&\mid&0&0&0&1
\end{pmatrix}\\ \xrightarrow{R_2\rightarrow R_2-R_3} \begin{pmatrix}
1&1&0&0&\mid&1&0&0&0\\
0&1&0&0&\mid&0&1&-1&1\\
0&0&1&0&\mid&0&0&1&-1\\
0&0&0&1&\mid&0&0&0&1
\end{pmatrix}\\ \xrightarrow{R_1\rightarrow R_1-R_2}
 \begin{pmatrix}
1&0&0&0&\mid&1&-1&1&-1\\
0&1&0&0&\mid&0&1&-1&1\\
0&0&1&0&\mid&0&0&1&-1\\
0&0&0&1&\mid&0&0&0&1
\end{pmatrix}.$$
Do this calculation yourself and try to understand the pattern, then show this pattern for a general matrix of the desired form. The other matrix can be dealt with in much the same fashion.
