<s>[INST] Write two matrices A and B correctly I’m currently working on matrices, and this is quite easy for me, however I have hard time to understand how to make these matrices $A$ and $B$ below. Maybe there is a typo?
Let $A$ and $B$ be two $n\times n$ matrices with the following entries
$$a_{ij}=\left\{\begin{matrix}
i & \text{for} & i=j-1\\ 
0 & \text{otherwise} & 
\end{matrix}\right.$$
$$b_{ij}=\left\{\begin{matrix}
1 & \text{for} & i=j+1\\ 
0 & \text{otherwise} & 
\end{matrix}\right.$$
I shall use these matrices $A$ and $B$ to prove that $[A,B]=I_n-C$ where C is the $(n\times n)$-matrix with entries 0 where the $(n\times n)$’th entry is $n$. I just want to get help to write these matrices $A$ and $B$ and then do the proof by my self.

Edit 1: My own idea is that my matrices $A$ and $B$ are the following,
$$A=\begin{pmatrix}
0 & 1 & 0 & \cdots & 0\\ 
0 & 0 & 1 & \cdots  & 0\\ 
0 & 0 & 0 &  \cdots & 0\\ 
\vdots & \vdots & \vdots & \ddots &0 \\ 
0 & 0 & 0 & \cdots & 0
\end{pmatrix}$$
and
$$B=\begin{pmatrix}
0 & 0 & 0 & \cdots & 0\\ 
1 & 0 & 0 & \cdots  & 0\\ 
0 & 1 & 0 &  \cdots & 0\\ 
\vdots & \vdots & \vdots & \ddots &0 \\ 
0 & 0 & 0 & \cdots & 0
\end{pmatrix}$$
But I cannot see how this should give me
$$I_n-C=\begin{pmatrix}
1 &  0&  0&  \cdots& 0\\ 
0 & 1 & 0 & \cdots & 0\\ 
0 & 0 & 1 & \cdots & 0\\ 
\vdots &\vdots  & \vdots & \ddots & 0\\ 
0 &0  &0  & 0 &1 
\end{pmatrix}-\begin{pmatrix}
0 &  0&  0&  \cdots& 0\\ 
0 &0 & 0 & \cdots & 0\\ 
0 & 0 & 0 & \cdots & 0\\ 
\vdots &\vdots  & \vdots & \ddots & 0\\ 
0 &0  &0  & 0 &n 
\end{pmatrix}=\begin{pmatrix}
1 &  0&  0&  \cdots& 0\\ 
0 & 1 & 0 & \cdots & 0\\ 
0 & 0 & 1 & \cdots & 0\\ 
\vdots &\vdots  & \vdots & \ddots & 0\\ 
0 &0  &0  & 0 &1-n
\end{pmatrix}$$
Edit 2: So thanks to Dietrich Burde I managed to get the answer for $n=2$ since
$$\begin{align*}
[A,B]&=\begin{pmatrix}
0 & 1\\ 
0 & 0
\end{pmatrix}\begin{pmatrix}
0 & 0\\ 
1 & 0
\end{pmatrix}-\begin{pmatrix}
0 & 0\\ 
1 & 0
\end{pmatrix}\begin{pmatrix}
0 & 1\\ 
0 & 0
\end{pmatrix}\\
&=\text{diag}(1,-1)\\
&=\begin{pmatrix}
1 & 0\\ 
0 & 1
\end{pmatrix}-\begin{pmatrix}
0 & 0\\ 
0 & 2
\end{pmatrix}\\
&=I_2-C.
\end{align*}
$$
But! I cannot get it to work for $n\geqslant 3$.
Edit 3: I corrected my $A$ such that
$$A=\begin{pmatrix}
0 & 1 & 0 & \cdots & 0\\ 
0 & 0 & 2 & \cdots  & 0\\ 
0 & 0 & 0 &  \cdots & 0\\ 
\vdots & \vdots & \vdots & \ddots &n-1 \\ 
0 & 0 & 0 & \cdots & 0
\end{pmatrix}$$
and now it works and I can continue with my proof.
 [/INST] The matrices look (almost) familiar.
Let $V(n)$ denote the $n$-dimensional standard irreducible $\mathfrak{sl}_2(\Bbb C)$-module. Let $\{e_1,e_2,e_3\}$ be a standard basis for
$\mathfrak{sl}_2(\Bbb C)$. The action on $V(n)$ is given by
$$
  \rho(e_1)=\begin{pmatrix} 0 & 1 & 0 & \cdots & 0 \\
    0 & 0 & 2 & \ddots & \vdots \\
  \vdots & \ddots & \ddots & \ddots & 0 \\
  \vdots & \ddots & \ddots & \ddots & n-1 \\
  0 & 0 & \cdots & 0 & 0    
\end{pmatrix},
$$
$$
\rho(e_2)=\begin{pmatrix} 0 & 0 & \cdots & 0 & 0 \\
n-1 & 0 & \ddots & 0 & 0 \\
0 & \ddots & \ddots & \ddots & \vdots \\
\vdots & \ddots & 2 & 0 & 0 \\
0 & \cdots & 0 & 1 & 0
\end{pmatrix}
$$
and
$$
  \rho(e_3)=\begin{pmatrix} n-1 & 0 & \cdots  & 0 & 0 \\
  0 & n-3 & \cdots & 0 & 0 \\
  \vdots & \ddots & \ddots & \ddots & \vdots \\
  0 & 0 & \ddots & 3-n & 0 \\
  0 & 0 & \cdots & 0 & 1-n    
\end{pmatrix}
$$
These are then your matrices $A,B,[A,B]$, in case there is also an $i$ in the definition of $B$.
</s>