Let $G$ be a graph with vertex set $\mathbf V$ and edges set $\mathbf E$. By $d(v)$ is denoted the degree of its vertex $v$. Two much studied degree--based graph invariants are the first and second Zagreb indices, defined as $M_1=\sum\limits_{u \in \mathbf V} d(u)^2$ and $M_2 = \sum\limits_{uv \in \mathbf E} d(u)\,d(v)$. A~recently proposed new invariant of this kind is the hyper--Zagreb index, defined as $HZ = \sum\limits_{uv \in \mathbf E} [d(u)+d(v)]^2$. The basic relations between this index and its coindex for a graph $G$ and its complement $\overline G$ are determined.