Question 347597
1. (a)  Given the matrix {{{A=(matrix(3,2,2,3,0,-1,1,4))}}}, 
what are its dimensions?
<pre>
Dimensions are "down by across".  It is 3 elements down
and 2 elements across.  So it's a 3 by 2.
</pre>

(b)  Can these matrices be multiplied?  Why or why not?
<pre>
{{{(matrix(3,1,2,4,0))(matrix(3,2,3,0,-2,3,1,2))}}}

No they can't, because the matrix on the left is a 3 by 1 matrix and the
matrix on the right is a 3 by 2 matrix.

You can only multiply a "p by q" matrix on the left by a "q by r" matrix 
on the right and get a "p by r" matrix.
  
        (p by <font color = "red">q</font>)×(<font color = "red">q</font> by r) = (p by r)

The "inner" dimensions <font color = "red">q</font> must be the same, and if so, then the product  
matrix will have the "outer" dimensions, p by r.  Examples:

A 6 by 5 matrix on the left can be multiplied by a 5 by 9 matrix on the right
to give a 6 by 9 matrix, because the inner dimensions are both 5 and the outer
dimensions are 6 by 9.

        (6 by <font color = "red">5</font>)×(<font color = "red">5</font> by 9) = (6 by 9)

A 3 by 1 matrix on the left can be multiplied by a 1 by 3 matrix on the right
to give a 3 by 3 matrix, because the inner dimensions are both 1 and the outer
dimensions are 3 by 3. 

        (3 by <font color = "red">1</font>)×(<font color = "red">1</font> by 3) = (3 by 3)

A 1 by 3 matrix on the left can be multiplied by a 3 by 1 matrix on the right
to give a 1 by 1 matrix, because the inner dimensions are both 3 and the outer
dimensions are 1 by 1.

        (1 by <font color = "red">3</font>)×(<font color = "red">3</font> by 1) = (1 by 1)

A 58 by 29 matrix on the left can be multiplied by a 29 by 73 matrix on the
right to give a 58 by 73 matrix, because the inner dimensions are both 29 and
the outer dimensions are 58 by 73.

        (58 by <font color = "red">29</font>)×(<font color = "red">29</font> by 73) = (58 by 73)

However, in your problem (b), a 3 by 1 matrix on the left cannot be multiplied
by a 3 by 2 matrix on the right, because the inner dimensions are 1 and 3 are
they are not the same. 

        (3 by <font color = "red">1</font>)×(<font color = "red">3</font> by 2)
is not defined because the inner dimensions are not the same.


If you had been given these matrices instead:

{{{(matrix(1,3,2,4,0))(matrix(3,2,3,0,-2,3,1,2))}}}

then you would have had a 1 by 3 matrix on the left to multiply by a 3 by 2
matrix on the right, and they could be multiplied because the inner dimensions
are both 3.  The product matrix would be a 1 by 2 matrix because they would be
the outer dimensions.

        (1 by <font color = "red">3</font>)×(<font color = "red">3</font> by 2) = (1 by 2)

However if you wrote the second one on the left and the first one on the right
like this:

{{{(matrix(3,2,3,0,-2,3,1,2))(matrix(1,3,2,4,0))}}}
 
you could not multiply them because the inner dimensions would not be the same:

        (3 by <font color = "red">2</font>)×(<font color = "red">1</font> by 3 is not defined.  

The commutative principle does not hold for matrix multiplication like it
holds for ordinary number multiplication.

That is when you multiply 2×3 you get 6, which is the same as when you
multiply 3×2.  So the commutative principle holds for ordinary number
multiplication.  

Notice this however.  When you multiply 

{{{(matrix(2,2,1,4,3,2))(matrix(2,2,5,6,-3,0))}}}, 

and they can be multiplied, because

        (2 by <font color = "red">2</font>)×(<font color = "red">2</font> by 2) = (2 by 2)

the inner dimensions are the same,

you get this 2 by 2 matrix  {{{(matrix(2,2,-7,6,9,18))}}}

But when you multiply 

{{{(matrix(2,2,5,6,-3,0))(matrix(2,2,1,4,3,2))}}},

and they can be multiplied, too, because

        (2 by <font color = "red">2</font>)×(<font color = "red">2</font> by 2) = (2 by 2)

the inner dimensions are the same,

you get this 2 by 2 matrix  {{{(matrix(2,2,23,32,-3,-12))}}}

So if you reverse the order of two matrices, even if they can still be 
multiplied, you don't get the same answer.

Edwin</pre>