 
 
 
 
 
 
Re: Coefficient with dot products
- To: mathgroup at smc.vnet.net
- Subject: [mg70579] Re: Coefficient with dot products
- From: Peter Pein <petsie at dordos.net>
- Date: Fri, 20 Oct 2006 05:21:44 -0400 (EDT)
- References: <eh4ocv$87e$1@smc.vnet.net>
Oliver Friedrich schrieb:
> Hallo,
> 
> I have some problems dealing with matrix equations:
> 
> I have an equation
> 
> m1.v1+m2.v2+m3.v3==0
> 
> where m are matrices and v are vectors. I want to use Coefficient on this 
> expression like
> 
> Coefficient[%,v1] but this seems not to work if dot product instead of an 
> ordinary product is used.
> How can I modify Coefficient or implement something on my own to fix this?
> 
Hi Oliver,
does
In[1]:=Do[v[i] = {x[i], y[i]}; m[i] = {{m11[i], m12[i]}, {m21[i], m22[i]}},
{i, 3}]
expr = Total[(m[#1] . v[#1] & ) /@ {1, 2, 3}]
Out[2]=
{m11[1]*x[1] + m11[2]*x[2] + m11[3]*x[3] + m12[1]*y[1] + m12[2]*y[2] +
m12[3]*y[3],
  m21[1]*x[1] + m21[2]*x[2] + m21[3]*x[3] + m22[1]*y[1] + m22[2]*y[2] +
m22[3]*y[3]}
In[3]:= Transpose[(Coefficient[expr, #1] & ) /@ v[1]]
Out[3]=
{{m11[1], m12[1]}, {m21[1], m22[1]}}
In[4]:= % == m[1]
Out[4]= True
solve your Problem?
P²

