Can i multiply an [6x1] matrix with an [6x6] in linear algebra?

1.4k Views Asked by At

I wish to multiply the first matrix

float X[6] =
{
  x,  //Position
  y,  //Position
  z,  //Position
  _x, //Velocity
  _y, //Velocity
  _z  //Velocity
}; 

with the second one. (where t = 2)

float F[6][6] = {
  { 1, 0, 0, t, 0, 0 },
  { 0, 1, 0, 0, t, 0 },
  { 0, 0, 1, 0, 0, t },
  { 0, 0, 0, 1, 0, 0 },
  { 0, 0, 0, 0, 1, 0 },
  { 0, 0, 0, 0, 0, 1 },
};

which is actually [6x1] * [6x6]

Is it posible? Or should i also convert the first matrix at [6x6] first?

1

There are 1 best solutions below

7
On BEST ANSWER

You can multiply it the other way around. You can multiply a 6x6 square matrix by a 6x1 column matrix. Suppose you are multiplying two matricies, the left one is $n\times m$ and the right one is $\ell\times j$. This multiplication fails by normal matrix multiplication rules if $m\neq \ell$. That is, you can only multiply an $n\times m$ by an $m\times j$ matrix. The resulting matrix has a dimensionality $n\times j$. There are other forms of matrix multiplication which may be applicable to you, but if you require normal matrix multiplication, you must follow this procedure.

If you are looking to get a square matrix back, this procedure will not work. You will get back a $6\times1$ column matrix by following this procedure.