Find AB where A= matrix and B=matrix $A=\left[\begin{array}{ccc} 2&1&0\\0&3&-1
\end{array}\right]$
$B=\left[\begin{array}{cc}a&1\\1&b\\b&a\end{array}\right]$
Matrices 
Find $AB$
 A: It seems that the matrix $A$ is $2\times 3$ and $B_{3\times 2}$ so we have $$AB=C_{2\times 2}$$ Now to do the latter matrix, you need to multiply the only row of $A$ by all columns of $B$ as follows:
 C[11]=[2 1 0][a  = 2*a+1*1+0*b=1+2a
               1
               b]

 C[12]=[2 1 0][1  = 2*1+1*b+0*a=2+b
               b
               a]

 C[21]=[0 3 -1][a  = 0*a+1*3+(-1)*b=3-b
                1
                b]

 C[22]=[0 3 -1][1  = 0*1+3*b+(-1)*a=3b-a
                b
                a]

A: $$AB=\left[\begin{array}{ccc} 2&1&0\\0&3&-1
\end{array}\right]\left[\begin{array}{cc}a&1\\1&b\\b&a\end{array}\right]$$
If you know basic matrix multiplication, you should know
$$\begin{align}
AB =& \left[\begin{array}{cc}
A\left[\begin{array}{c}a\\1\\b\end{array}\right]&
A\left[\begin{array}{c}1\\b\\a\end{array}\right]
\end{array}\right]\\=& \left[\begin{array}{cc}
\left[\begin{array}{ccc}2&1&0\\0&3&-1\end{array}\right]\left[\begin{array}{c}a\\1\\b\end{array}\right]&
\left[\begin{array}{ccc}2&1&0\\0&3&-1\end{array}\right]\left[\begin{array}{c}1\\b\\a\end{array}\right]
\end{array}\right]\\
=&\left[\begin{array}{cc}
\left[\begin{array}{ccc}2&1&0\end{array}\right]\left[\begin{array}{c}a\\1\\b\end{array}\right]&
\left[\begin{array}{ccc}2&1&0\end{array}\right]\left[\begin{array}{c}1\\b\\a\end{array}\right]\\
\left[\begin{array}{ccc}0&3&-1\end{array}\right]\left[\begin{array}{c}a\\1\\b\end{array}\right]&
\left[\begin{array}{ccc}0&3&-1\end{array}\right]\left[\begin{array}{c}1\\b\\a\end{array}\right]
\end{array}\right]\\
=&\left[\begin{array}{cc}
2a+1&
\left[\begin{array}{ccc}2&1&0\end{array}\right]\left[\begin{array}{c}1\\b\\a\end{array}\right]\\
\left[\begin{array}{ccc}0&3&-1\end{array}\right]\left[\begin{array}{c}a\\1\\b\end{array}\right]&
\left[\begin{array}{ccc}0&3&-1\end{array}\right]\left[\begin{array}{c}1\\b\\a\end{array}\right]
\end{array}\right]
\end{align}$$
For each value in the resultant array, the row vector and column vector multiplication is simply the sum of product of corresponding values. For example
$$\begin{align}
\left[\begin{array}{ccc}2&1&0\end{array}\right]\left[\begin{array}{c}a\\1\\b\end{array}\right] =& 2\times a + 1\times 1 + 0\times b\\
=& 2a +1
\end{align}$$
You should be able to find all values in terms of $a$ and $b$ now.
