In a C*-algebra, put $a^*a \sim aa^*$. Transitivity fails?

Idle curiosity drove me to wonder about the following question. Let $A$ be a C*-algebra. Define a binary relation $\sim$ on the cone $A^{\geq 0}$ of positive elements by putting $x \sim y$ whenever there is an $a \in A$ such that $x = a^*a$ and $y = aa^*$. This is just like Murray-von Neumann equivalence but for arbitrary positive elements instead of projections.

The relation $\sim$ is reflexive since any positive $x$ can be written $x = (\sqrt{x})^* \sqrt{x} = \sqrt{x} (\sqrt{x})^*$ where $\sqrt{x}$ is the unique positive square root of $x$. It is symmetric since if $x = a^* a$ and $y = aa^*$ then $x = bb^*$ and $y = b^*b$ where $b=a^*$.

I see no obvious reason for $\sim$ to be transitive. I suspect it is not, but I couldn't come up with a counterexample.

Some observations:

  • As 5pm points out below, if $A$ is unital and $x,y \in A$ are invertible, then $x \sim y$ if and only if $y = uxu^*$ for some unitary $u$. It follows that the restriction of $\sim$ to the invertible elements of $A$ is an equivalence relation.
  • It is an equivalence relation in the case $A=B(H)$ for some Hilbert space $H$. Indeed, if $x = a^* a$ and $y = aa^*$ then, polar decomposing $a$ as $u \sqrt{a^*a}$, we get that $y = u x u^*$ for a partial isometry $u$ with initial space $\overline{\mathrm{ran}(x)}$ and final space $\overline{\mathrm{ran}(y)}$. Since the composition of partial isometries with compatible supporting subspaces is another partial isometry, we get the transitivity.

Some more observations:

  • If it occurs that, $$ \text{for every $a \in A$, there exists $b \in A$ such that $aa^* = b^*(a^*a)b$,}$$ then $\sim$ is clearly transitive. The latter occurs, for example, when every element $a \in A$ has a "weak polar decomposition" $a = b \sqrt{a^*a}$ for any $b \in B$. In particular, existence of polar decompositions suffices to prove $\sim$ is transitive.
  • We can still have $\sim$ transitive if the above condition fails. For example, if $f \in C_0(\mathbb{R})$ is nonvanishing, then there is no $g \in C_0(\mathbb{R})$ with $fg = f$. Obviously $\sim$ is transitive in commutative C*-algebras.

I think I figured it out! The answer seems to be that transitivity holds. I would appreciate any feedback on my proof. Let $A$ be an arbitrary C*-algebra. Given positive elements $x,y \in A$ and $a \in A$, I will write $x \sim^a y$ to mean that $x = a^*a$ and $y =aa^*$.

Lemma. If $x \sim^a y$, then there is a factorization $a = a_1 x^{1/4}$ such that $x^{1/2} \sim^{a_1} y^{1/2}$.

Proof. Without loss of generality, $A \subset B(H)$ for some Hilbert space $H$. Perform polar decomposition in $B(H)$ to write $a= w x^{1/2}$ where $w$ is a uniquely determined partial isometry whose supporting projection $w^* w$ equals the closed range of $x^{1/2}$. Now it may be that $w \notin A$, but an easy polynomial approximation argument shows that $a_1 = wx^{1/4} \in A$. So we have the factorization $a = a_1 x^{1/4}$. Observe $a_1^* a_1 = x^{1/4} w^* w x^{1/4} = x^{1/4} x^{1/4} = x^{1/2}$. Meanwhile, $(a_1a_1^*)^2 = a_1 (a_1^* a_1)a_1^* = w x^{1/4} x^{1/2} x^{1/4} w^* = (w x^{1/2})(w x^{1/2})^* = aa^* = y$ so that $a_1 a_1^* = y^{1/2}$.

Now we can prove the main result.

Theorem. The relation $\sim$ is transitive.

Proof. Suppose positive elements $x,y,z$ have $x \sim^a y \sim^b z$ for $a,b \in A$. By the lemma, we have factorizations $a = a_1 x^{1/4}$ and $b = b_1 x^{1/4}$ such that $x^{1/2} \sim^{a_1} y^{1/2} \sim^{b_1} z$. We shall see that $x \sim^{b_1 a_1} z$. Indeed: $$ (b_1a_1)^*(b_1a_1) = a_1^* b_1^* b_1 a_1 = a_1^* y^{1/2} a_1 = a_1^* a_1 a_1^* a_1 = x^{1/2} x^{1/2} = x$$ $$ (b_1a_1)(b_1a_1)^* = b_1 a_1 a_1^* b_1^* = b_1 y^{1/2} b_1^*= (b_1 y^{1/4})(b_1 y^{1/4})^* = bb^* = z.$$