Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2011

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

Search the Archive

Re: derivative of matrix in mathematica

  • To: mathgroup at
  • Subject: [mg120156] Re: derivative of matrix in mathematica
  • From: Heike Gramberg <heike.gramberg at>
  • Date: Sun, 10 Jul 2011 05:01:51 -0400 (EDT)
  • References: <>

You could do something like

n = 3;
matrix := Table[p[i, j][#], {i, 1, n}, {j, 1, n}] &

then matrix'[t] gives

{{Derivative[1][p[1, 1]][t], Derivative[1][p[1, 2]][t],
  Derivative[1][p[1, 3]][t]}, {Derivative[1][p[2, 1]][t],
  Derivative[1][p[2, 2]][t],
  Derivative[1][p[2, 3]][t]}, {Derivative[1][p[3, 1]][t],
  Derivative[1][p[3, 2]][t], Derivative[1][p[3, 3]][t]}}

To set each of the elements of this matrix equal to the elements of another matrix
you can do something like

  SetDelayed, {matrix[t_], Table[Sin[i t] j, {i, 1, n}, {j, 1, n}]}, 2];


On 9 Jul 2011, at 12:32, yashar wrote:

> hi
> in mathematica
> how i can produce a general n by n matrix so that each of its elements be a variable of t???
> how i can take derivative of this matrix with respect to variable t?
> how i can with equating this n by n matrix with another n by n matrix which its elements are known obtain unknown elements of this general n by n matrix?

  • Prev by Date: Re: Which Test is Used to Verify Assumptions in TTest
  • Next by Date: Re: Numerical accuracy/precision - this is a bug or a feature?
  • Previous by thread: Re: derivative of matrix in mathematica
  • Next by thread: Re: derivative of matrix in mathematica