0

Suppose that the vector is

Psi={{a},{b}};

and a and b are imaginary numbers in general. I want to calculate in Mathematica the tensor product and define a1,b2 as the complex conjugates. I have tried the following

(Psi = {{a}, {b}}) // MatrixForm
(Psi1 = MatrixForm[Assuming[{a, b} \[Element] \Complex,Simplify@ConjugateTranspose[Psi]]])
(R=(Psi).(Psi1))//MatrixForm

but it doesn't work like i want it to.

P.S.: I want to get the following result

$$ R=\begin{pmatrix} \vert{a}\vert^2 & ab^{*}\\ a^{*}b & \vert{b}\vert^2 \end{pmatrix} $$

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574

1 Answers1

3
ψ = {a, b};
ψ1 = Conjugate[ψ];
R = KroneckerProduct[ψ, ψ1]

(*    {{a*Conjugate[a], a*Conjugate[b]},
       {b*Conjugate[a], b*Conjugate[b]}}    *)

R // TeXForm

$$ \left( \begin{array}{cc} a a^* & a b^* \\ b a^* & b b^* \\ \end{array} \right) $$

In Mathematica, there is no concept of row vectors vs. column vectors, so there is no need to transpose (conjugation is enough). Tutorial

Do not use MatrixForm as it interferes with computation (it is only a display wrapper).

Roman
  • 47,322
  • 2
  • 55
  • 121