# matrix and vector multiplication distribution rules

(M x f) . (N x g)


M and N are square matrices n-by-n, g are column vectors n-by-1. "." is dot product. "x" is matrix multiplication

Under what conditions can I do this operation?

=M x N (f.g)


For example, let M and N be the matrix given by syntax [(r1c1,r1c2),(r2c1,r2c2)]

f is [(3),(4)]. g is [(1),(3)]


Example 1:

M,N are both 2 * I_2 (2-by-2 identity matrix)


Eq 1 gives [(6),(8)] . [(2),(6)] = 60

Eq 2 gives 4 * I_2 * 15 = 60 // matrix dimension problem

Example 2:

M,N are both [(2,1),(2,5)].


Eq 1 gives [(7),(26)] . [(5),(17)] = 477

Eq 2 gives [(6,7),(14,27)] 15

Obviously the property isn't quite right as the matrix dimensions don't match. However, this is very close to a theorem I need for my work. Can anyone help me clear this up. It seems that I can go from (M x f) . (N x g) => M x N (f.g) in my case, but I need proof if I want to base another theorem on this.

I am hoping there is an easy "you can distribute as long as __" type of answer. If not, I can provide more details if necessary.

-
(Mxf).(Nxg) is a scalar, MxN is a matrix, and f.g is a scalar. So (Mxf).(Nxg)=MxN(f.g) says that some scalar is equal to some matrix. Is that what you want? In general, you can say that $$N^TMf\cdot g=Mf\cdot Ng=f\cdot M^TNg.$$ – anon Mar 20 '13 at 1:30
@anon, I'd put in some parentheses so it would be clear that you mean $(N^tMf)\cdot g$ and not $(N^tM)(f\cdot g)$. – Gerry Myerson Mar 20 '13 at 1:59
Looking at example 1, I get 60 and 60 [I] using the two methods. I need a way to generalize this – SwimBikeRun Mar 20 '13 at 5:25
Is there a name for the first comment above? I want to search for it – SwimBikeRun Mar 20 '13 at 7:10