# Using Assumptions to evaluate a complex outer product

Mathematica doesn't want to enforce assumptions on an expression. I define a complex outer product for a vector f

Scalar[a_, b_] := Dot[a, Conjugate[b]]
f = {Cos[a/2], E^(I b) Sin[a/2]};
Outer[Scalar, f, f]


If I try to define $Assumptions or use Assuming to say that a and b are Real elements, it does not simplify the expression for Outer. • Simplify[Outer[Scalar[{#}, {#2}] &, f, f], Assumptions -> Element[{a, b}, Reals]] or Assuming[{Element[{a, b}, Reals]}, Simplify[Outer[Scalar[{#}, {#2}] &, f, f]]] ? – kglr Nov 26 '17 at 22:36 • $Assumptions and Assuming only help with functions that have an Assumptions option. Neither Dot nor Outer take assumptions so there is nothing done with the assumptions. – Bob Hanlon Nov 27 '17 at 1:04
• @kglr That worked! Maybe how you defined the scalar product with the extra symbols helped to simplify. – Buddhapus Nov 27 '17 at 5:53

Simplify[Outer[Scalar[{#}, {#2}] &, f, f], Assumptions -> Element[{a, b}, Reals]]//TeXForm

$\left( \begin{array}{cc} \cos ^2\left(\frac{a}{2}\right) & \frac{1}{2} e^{-i b} \sin (a) \\ \frac{1}{2} e^{i b} \sin (a) & \sin ^2\left(\frac{a}{2}\right) \\ \end{array} \right)$
Assuming[{Element[{a, b}, Reals]}, Simplify[Outer[Scalar[{#}, {#2}] &, f, f]]]//TeXForm

$\left( \begin{array}{cc} \cos ^2\left(\frac{a}{2}\right) & \frac{1}{2} e^{-i b} \sin (a) \\ \frac{1}{2} e^{i b} \sin (a) & \sin ^2\left(\frac{a}{2}\right) \\ \end{array} \right)$