<s>[INST] Matrix Multiplication Understanding I have to multiply two 3x3 matrices. I don't understand the answer. 
$$A=\begin{pmatrix}1&0&1\\ 0&1&1\\ 0&0&1 \end{pmatrix}$$
$$B=\begin{pmatrix}1&0&-1\\ 0&1&-1\\ 0&0&1 \end{pmatrix}$$
The answer given online is $$AB=\begin{pmatrix}1&0&1\\ 0&1&1\\ 0&0&1 \end{pmatrix}$$
I don't understand how this is so. I have said that:
$$AB=\begin{pmatrix}(1)(1)+(0)(0)+(1)(0) & (1)(0)+(0)(1)+(1)(0) & (1)(-1)+(0)(-1)+(1)(1)\\(0)(1)+(1)(0)+(0)(0) & (0)(0)+(1)(1)+(1)(0) & (0)(-1)+(1)(-1)+(1)(1) \\ (0)(1)+(0)(0)+(1)(0) & (0)(0)+(0)(1)+(1)(0) & (0)(-1)+(0)(-1)+(1)(1) \end{pmatrix}$$
$$AB=\begin{pmatrix}1 & 0 & (1)(-1)+(0)(-1)+(1)(1)\\0 & 1 & (0)(-1)+(1)(-1)+(1)(1) \\ 0 & 0 & 1 \end{pmatrix}$$
$$AB=\begin{pmatrix}1 & 0 & 0\\0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$$
Can anyone tell me where I am going wrong?
 [/INST] I agree with your work, and if they posted  $AB=\begin{pmatrix}1&0&1\\ 0&1&1\\ 0&0&1 \end{pmatrix}$ as the answer for the product, it seems they're incorrect.
Another fast way to see that their answer is not feasible is to notice that they are writing $AB=A$. Since $A$ is an upper triangular matrix with no zeros on the main diagonal, its determinant is clearly nonzero, so it is invertible. Then we can take $AB=A$ and multiply on the left with the inverse:
$$A^{-1}AB=A^{-1}A\implies B=I$$
But $B$ is obviously not the identity matrix.
</s>