The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: writing tensor in mathematica
Replies: 2   Last Post: Oct 29, 2013 1:36 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
W. Craig Carter

Posts: 266
Registered: 9/10/05
Re: writing tensor in mathematica
Posted: Oct 29, 2013 1:35 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear Dhaneshwar,
I believe this may be what you are looking for:
avec = Array[a, 3]
bvec = Array[b, 3]
ctens = Array[c, {3, 3, 3, 3}]

ab[j_, k_] :=
Sum[avec[[i]] ctens[[i, j, k, m]] bvec[[m]], {i, 1, 3}, {m, 1, 3}]

This may be enough to get you started, but there is also documentation for tensors (type tensor into the help browser) in the documentation.

Kind Regards,

W Craig Carter

On Oct 28, 13, at 20:22 PM, Dhaneshwar Mishra wrote:

> Hi
> I am Dhaneshwar Mishra, new to the Mathematica.
> I would like to write
> [ab]_(jk) = a_i [C_(ijkm)] b_m
> in the matrix form, where I,j,k, m varies from 1 to 3. Being a new user, I find
> little difficult to find proper help from the Mathematica documentations.
> Please suggest me appropriate reading materials so that I can take help of that as well.
> Thanks in advance.
> With regards
> Dhaneshwar

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.