Let
H be a complex Hilbert space, and
\mathcal{H}\left( H \right) be the real linear space of bounded selfadjoint operators on
H. We study linear maps
\phi :\,\mathcal{H}(H)\,\to \,\mathcal{H}(H) leaving invariant various properties such as invertibility, positive definiteness, numerical range, etc. The maps
\phi are not assumed a priori continuous. It is shown that under an appropriate surjective or injective assumption
\phi has the form
X\mapsto \xi TX{{T}^{*}}orX\mapsto \xi T{{X}^{t}}{{T}^{*}}, for a suitable invertible or unitary
T and
\xi \,\in \,\{1,\,-1\}, where
{{X}^{t}} stands for the transpose of
X relative to some orthonormal basis. Examples are given to show that the surjective or injective assumption cannot be relaxed. The results are extended to complex linear maps on the algebra of bounded linear operators on
H. Similar results are proved for the (real) linear space of (selfadjoint) operators of the form
\alpha I\,+\,K, where
\alpha is a scalar and
K is compact.