5

I would like the number $a$ to be taken out:

$Assumptions = (a) \[Element] Complexes && (X) \[Element] 
    Matrices[{n, n}];

(a X).(a IdentityMatrix[n]) // FullSimplify 

Is there a way to make this product to yield $a^2 X$ instead of (X a).(a IdentityMatrix[n])? And to simplify the IdentityMatrix[n] as well?

P.S. Mathematica 10.

João
  • 155
  • 5

1 Answers1

8

Use TensorExpand[] instead:

Assuming[a ∈ Complexes && X ∈ Matrices[{n, n}], 
         TensorExpand[(a X).(a IdentityMatrix[n])]]
   a^2 X
J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574