Re: Solving an equation
- To: mathgroup at smc.vnet.net
- Subject: [mg34497] Re: [mg34465] Solving an equation
- From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
- Date: Fri, 24 May 2002 02:41:58 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
The easiest way is to let Solve do everything: In[1]:= a = {{1, 0}, {0, 1}}; b = {{b1, b2}, {b3, b4}}; c = {{c1, c2}, {c3, c4}}; In[2]:= sol = Solve[{x*a + y*b == c, b . c == c . b}, {x, y}] Out[2]= {{x -> -((b4*c3)/b3) + c4, y -> c3/b3}} Checking: In[3]:= Simplify[x*a + y*b - c /. sol[[1]]] /. AlgebraicRules[Flatten[b . c == c . b]] Out[3]= {{0, 0}, {0, 0}} Andrzej Kozlowski Toyama International University JAPAN http://platon.c.u-tokyo.ac.jp/andrzej/ On Thursday, May 23, 2002, at 04:32 PM, PSi wrote: > > I want to solve the following equation with Mathematica 4.1: > a*x+b*y=c > where x, y are the unknown scalars, > a={{1,0},{0,1}}, > b={{b1,b2},{b3,b4}}, > c={{c1,c2},{c3,c4}}, > the matrices b, c commute, and the matrix b is not a scalar multiple of > the unit > matrix a. > Could anybody help? > > > > > > > > > >