# Distribute transpose on matrix multiplication

I need to do the following:

Transpose[A.(B+C)]=Transpose[B].Transpose[A]+Transpose[C].Transpose[A]


How should I do this in mathematica? So far mathematica does not distribute the operation. Thank you!

• The NCAlgebra package might be able to do this. Jul 21, 2015 at 18:31

Update: it seems this only works in 10.1 and later, but not in 10.0.

This works:

Assuming[(a | b | c) ∈ Matrices[{d, d}], TensorExpand@Transpose[a.(b + c)]]

(* Transpose[b, {2, 1}].Transpose[a, {2, 1}] + Transpose[c, {2, 1}].Transpose[a, {2, 1}] *)


We needed to tell Mathematica that a, b and c are square matrices and use TensorExpand.

Check here: Symbolic tensors.

• What do the | change? Jul 21, 2015 at 18:35
• @space_voyager Check Element, third line from the top. Jul 21, 2015 at 18:35
• +1, just FTR it doesn't work in v9 Jul 21, 2015 at 18:39
• @Szabolcs I'm sorry but doing what you said gives in Mathematica 10.0: Transpose[b + c, {2, 1}].Transpose[a, {2, 1}] which is not what I want. Suggestions? Jul 21, 2015 at 19:05
• Yes there was a bug in 10.0 that prevented this from working. It is fixed in 10.1 and later versions. Jul 21, 2015 at 19:48