Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Selecting diagonal elements from a matrix to make a vector

  1. Sep 25, 2008 #1

    I am looking for a certain operation that makes a 1 tensor from a 2 tensor by filtering out only the diagonal elements.

    For instance,

    (f1g1 f1g2 f1g3)
    (f2g1 f2g2 f2g3)
    (f3g1 f3g2 f3g3)



    after a certain operation.

    What operation could I use?

    Thanks a million for the one who can help me out here.

  2. jcsd
  3. Sep 25, 2008 #2

    Ben Niehoff

    User Avatar
    Science Advisor
    Gold Member

    I don't think the resulting object is a 1-tensor. How would it transform?

    If all you want is the SUM of those elements, then you can do simple tensor contraction: Tii. To make a 1x3 object out of the diagonal elements, you could write (no summation convention):

    [tex]\sum_i T^{ii} \vec e_i[/tex]

    But this object is NOT a vector; it doesn't transform correctly.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook