This the question.
Given. A = [1 -1
2 -2
3 -3]

And matrix B = [1
0
2]
what is the product A.B?

Ok I'm confused because the number of rows in A is 2 and number Of columns in B is 3. So the sizes of matrices do not match up. So I cannot answer the question, am I right?

Maybe it is like...
Ax = B

And the question is missing something there?

This the question.
Given. A = [1 -1
2 -2
3 -3]

And matrix B = [1
0
2]
what is the product A.B?

Ok I'm confused because the number of rows in A is 2 and number Of columns in B is 3. So the sizes of matrices do not match up. So I cannot answer the question, am I right?

Nope nothings missing, I think its a trick question, just want to know if its possible or not to answer it.

Actually matrix B has 3 rows. Actually consider it dimensionally as x, y, and z. So matrix A has 2 dimensions x (3 values), and y (2 values per dimension x), and matrix B has 1 dimension (x). So, the product matrix C is 2 dimensional. So C(X) = A(X) * B(X), and C(Y) = A(Y) * B(X).

Or more simply, using a C language structure

int A[3][2], B[3], C[3][2];
for (int i = 0; i < 3; i++)
{
   for (int j = 0; j < 2; j++)
   {
      C[i][j] = A[i][j] * B[i];
   }
}

So, matrix C should =
[ 1 -1
0 0
6 -6 ]

In any case, check out this article for a more rigorous treatment: http://en.wikipedia.org/wiki/Matrix_multiplication

rubberman, that's not how you multiple 2 matrices...

Given a matrix A with m x n dimension. A matrix which can be multiply with matrix A should have n dimension. In this case, A dimension is 3 x 2 and B dimension is 1 x 3. When you multiply a matrix by hand, it should be...

Let A be  3 x 2
  |a b|
  |c d|
  |e f|
Then B could be 2 x 3 (at least m must be 2)
  |g h i|
  |j k l|

So AxB is equal (produce 3 x 3)
  |(a*g)+(b*j)  (a*h)+(b*k)  (a*i)+(b*l)|
  |(c*g)+(d*j)  (c*h)+(d*k)  (c*i)+(d*l)|
  |(e*g)+(f*j)  (e*h)+(f*k)  (e*i)+(f*l)|

Though, I can see a portion cut out from the question where xA is. Could you actually show the whole question?

Ok I'm going to upload a pic now, it gives four possible answers I chose answer 4 because I think I am unable to answer the question because the sizes of the matrices do not match

Yes, #4 is correct to me. It just tests you if you understand matrix multiplication.

I agree too.
Answer 4 is the best.

This product cannot be calculated.

Matrix A is 3 x 2 and Matrix B is 3 x 1.
To be able to form the product AB, the number of columns of A has to be the same as the number of rows of B.

2 is the correct answer. That's not multiply, that's dot product. Notice the dot between them.

Unless there's some atypical definition of dot product, you can't take the dot product of two matrices, or of a matrix and a vector.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.