Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have two matrix expressions:

X.Transpose[T].Transpose[X] 

and

X.T.Transpose[X] 

I want Mathematica to recognize that these expressions are equal. Is it possible to do that?

share|improve this question
1  
Answer probably depends on how you plan to use this known relation. Can you clarify the use case? –  kirma Aug 27 '13 at 9:52
    
I am confused. Why are these equal? x = RandomReal[1, {4, 4}]; t = RandomReal[1, {4, 4}]; z0 = x.Transpose[t].Transpose[x]; z1 = x.t.Transpose[x]; z1 - z0 gives !Mathematica graphics should this not be all zeros if they are equal? –  Nasser Aug 27 '13 at 11:01
    
Isn't this the same question as this? –  István Zachar Aug 27 '13 at 11:33
    
@Nasser I don't think that the OP means they are equal in general, but more in a $Assumptions kind of way. –  sebhofer Aug 27 '13 at 11:46
    
@Nasser Huh, but that's how $Assumptions are usually used for, no? The only question is if it will be helpful for the OP, as kirma pointed out... –  sebhofer Aug 27 '13 at 11:52

1 Answer 1

We can easily verify the assumption that your matrices are equal is wrong, e.g. let's take two 2 x 2 matrices:

A = {{10, 5}, {2, 2}};
B = {{1, 0}, {1, 6}};

now we have

A.B.Transpose[A] == A.Transpose[B].Transpose[A]
False

However a simple fact in linear algebra says that the former matrix is equal to the latter one transposed.

TraditionalForm[ X.T.Transpose[X] == Transpose[X.Transpose[T].Transpose[X]] ]

enter image description here

Now we can exploit new tensor capabilities in Mathematica 9, first assume that X and T are n x m matrices:

$Assumptions = (X | T) ∈  Matrices[{n, m}];

then we can use e.g. TensorReduce:

TensorReduce[ X.T.Transpose[X] == Transpose[ X.Transpose[T].Transpose[X]] ]
True 
share|improve this answer
    
@sebhofer Most of this site users know well this simple identity in linear algebra. I demonstrated that his "theorem" is not true by providing a simple example. Then I showed what kind of identity he could assumed and next solved that problem. My answer is clear enough even for first-year student. –  Artes Aug 27 '13 at 12:29
    
With considerable effort, I could interpret OP asking how to provide assumption that T is symmetric. If this is the case, formulation of the question is not very direct. –  kirma Aug 27 '13 at 13:00
    
I was wrong, sorry... I thought one could construct an example where T-Transpose@T is in the null-space of X, but this is not possible. I should have thought further first. Sorry for the fuzz! –  sebhofer Aug 27 '13 at 13:04
1  
@kirma If you want such an assumption use $Assumptions = G ∈ Matrices[{n, n}, Complexes, Symmetric[{1, 2}]]. Then TensorReduce[G - Transpose[G]] yields 0. If your interpretation would be the case one should have assumed Det[X] != 0 as well. –  Artes Aug 27 '13 at 14:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.