0
$\begingroup$

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} $$

$\endgroup$

1 Answer 1

3
$\begingroup$
ψ = {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).

$\endgroup$
1
  • $\begingroup$ Thank you so much, just what i needed! :) $\endgroup$
    – Assassinos
    Commented Apr 25, 2021 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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