Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1994

[Date Index] [Thread Index] [Author Index]

Search the Archive

Need help setting up a list of equations using "matrix notation"

  • To: mathgroup at
  • Subject: Need help setting up a list of equations using "matrix notation"
  • From: jmm at
  • Date: Wed, 6 Jul 1994 13:25:52 -0700 (PDT)

I am trying to set up a model to solve a system of equations.  There are three
different types of equations.  For clarity and generality I want to express
each equation type in "matrix notation", that is, as x == y, where x and y are
both column vectors.  Thus, I think I want to represent the following

	{ {x1 == y1}, {x2 == y2}, . . . , {xn == yn}}

in compact matrix notation.

I am not succeeding. When I try to put together the 3 sets of equations (say,
to feed to FindRoot), I am getting a mess.  Here is a sample of how I try it.
(rho and dL are 2x1 vectors; mu is 3x1; dZ is 3x2.  Through the magic of
Mathematica's matrix algebra, Dot[mu,dZ] or mu . dZ is 2x1)

prices = rho - (gamma * (1 + dL) +
	(mu . dZ)) == ZeroMatrix[2,1]

              -200 + g1   -2200 + g2     mu1   mu2
{-(gamma (1 + --------- + ----------)) - --- + --- +
                18750       37500         3     3

    2 mu3
    ----- + rho1, -(gamma

            -200 + g1   -2200 + g2     mu1   2 mu2
       (1 + --------- + ----------)) + --- + ----- +
              37500       18750         3      3

    --- + rho2} == {{0}, {0}}

So, if x and y are 2x1 vectors, I am basically get the following list:

	{{x1,x2} == {y1,y2}}		(type A)

When I need something in the form

	{{x1 == y1}, {x2 == y2}}.        (type B)

Obviously, I am not a wizard at list processing.  Can someone point me towards
a clean, elegant way to set up this vector of equations so that I can still
use matrix notation and end up with an equation list (of type B) that I can
combine with another equation list?  (Alternative, a way to combine two lists
of type A to make a single list that FindRoot would be happy with?)

Prof. Jeff MacKie-Mason	                
Dept. of Economics         Jan-July 28 '94: California Energy Institute
Univ. of Michigan                                     2539 Channing Way
Ann Arbor, MI 48109-1220                             Berkeley, CA 94720
internet: jmm at       phone: 510-642-3570     fax: 510-642-3570

  • Prev by Date: Simulating Nature with Mathematica
  • Next by Date: Re: Alternative to Timing[10000!] benchmark
  • Previous by thread: Simulating Nature with Mathematica