Solution (source code)

= Solution

On $X^+$, $z^2>x^2+y^2$, so $z\ne0$ and therefore $a=-2z\ne0$. Yet $a(I)=-2$ and $a(-I)=2$. The same <continuous image of a connected space> argument shows that \b[$X^+$ is not connected].

Put $r=\sqrt{x^2+y^2}$. The required three disjoint nonempty open sets are
$$
\boxed{X_1=\{z>r\},\qquad X_2=\{z<-r\},\qquad X_3=\{|z|<r\}.}
$$
Their union is precisely $X$, the complement of the double cone $z^2=x^2+y^2$. The <eigenvalues> are $z\pm r$, so $X_1$ consists of <positive-definite matrices> above the upper sheet, $X_2$ of <negative-definite matrices> below the lower sheet, and $X_3$ of <indefinite matrices> outside the double cone. Examples are $I,-I,\operatorname{diag}(1,-1)$ respectively.

The two definite cones are <convex sets>. The indefinite region is <path-connected>: shrink $z$ continuously to zero while keeping $r>0$, then change the nonzero vector $(x,y)$ within the <punctured plane>. Thus these sets are also exactly the three <connected components>. This is the <determinant cone for real symmetric two-by-two matrices>.

\Image[/past-exam-of-the-metric-spaces-and-complex-analysis-course-of-the-university-of-oxford/2017-symmetric-matrix-cone.png]
{title=The determinant-zero cone separates three components of invertible symmetric matrices}
{description=The left panel shows the double cone. The right panel is a radial section: the exterior indefinite region is connected around the cone in three dimensions, although its two sides appear separated in this section.}