Find: 1) $AB$; 2) $BA$ Define the morphisms $A$ and $B$ on the vector space $\mathbb{R}^n$  by
$$A(x_1,x_2,x_3,......,x_n) =(0,x_1,x_2,........,x_{n-1})$$
and 
$$B(x_1,x_2,.......,x_n) = (x_n,x_1,x_2,......x_{n-1})$$
Find the followings maps:
$1)$ $AB$
$2)$ $BA$
My attempts :  I know  that  Both $A$ and $B$ are linear transformation...but here  I could not be able to find what is $AB$ and $BA$?
Any hints/solution will be appreciated.
Thanks  in advance..
 A: $$
AB 
[x_1 \ x_2 \ldots x_n ]^T
=
A [x_n \ x_1 \ x_2 \ldots x_{n-1} ]^T
=
[0 \ x_n \ x_1 \ldots x_{n-2} ]^T
$$
This means $AB$ is shifting downwards the nulling the first element
So
$$AB = \begin{bmatrix}
0 & \ldots & 0 & 0 & 0 \\
0 & 0 & \ldots & 0 & 1 \\
1 & 0 & \ldots & 0 & 0 \\
\vdots & \vdots & \ddots & \ldots & 0 \\
0 & \ldots & 1 &  0 & 0 \\
\end{bmatrix}$$
However, $BA$ behaves differently, let's see why 
$$
BA 
[x_1 \ x_2 \ldots x_n ]^T
=
B [0 \ x_1 \ x_2 \ldots x_{n-1} ]^T
=
[x_{n-1} \ 0 \ x_1 \ x_2 \ldots x_{n-2} ]^T
$$
So
$$BA = \begin{bmatrix}
0 & \ldots & 0 & 1 & 0 \\
0 & 0 & \ldots & 0 & 0 \\
1 & 0 & \ldots & 0 & 0 \\
\vdots & \vdots & \ddots & \ldots & 0 \\
0 & \ldots & 1 &  0 & 0 \\
\end{bmatrix}$$
Looks weird but only the first two elements of the mappings differ.
A: Yes, $A$ and $B$ are linear transformations, although with somewhat odd names as you usually use these uppercase letters for matrices(which you can identify with linear maps of course).
$AB$, in the context of maps, represents the composition $A\circ B$($A$ applied after $B$), i.e. $$AB(x_1,\dots,x_n)=A(B(x_1,\dots,x_n))=A(x_n,x_1\dots,x_{n-1})=(0, x_n, x_1,\ldots, x_{n - 2})$$
Similar for $BA$, you have 
$$BA(x_1,\dots, x_n) =B(A(x_1,\dots,x_n))= B(0, x_1,\dots, x_{n - 1}) = (x_{n - 1}, 0, x_1, \dots, x_{n - 2})$$
A: $A$ is the right shift, shifting in $0$;  $B$ is the cycle; so:
$AB(x_1, x_2, \ldots, x_n) = A(x_n, x_1, x_2, \ldots, x_{n - 1}) = (0, x_n, x_1, x_2, \ldots, x_{n - 2}); \tag 1$
$BA(x_1, x_2, \ldots, x_n) = B(0, x_1, x_2, \ldots, x_{n - 1}) = (x_{n - 1}, 0, x_1, x_2, \ldots, x_{n - 2}); \tag 1$
A: Hint
$$AB(x_1,\dots,x_n)=A(B(x_1,\dots,x_n))=A(x_n,x_1,\dots,x_{n-1})=(0,x_n,x_1,\dots, x_{n-2}).$$
