  Let $G=(V,E)$ be a graph of order $n$. A closed distance magic labeling of
$G$ is a bijection $\ell \colon V(G)\rightarrow \{1,\ldots ,n\}$ for which
there exists a positive integer $k$ such that $\sum_{x\in N[v]}\ell (x)=k$ for
all $v\in V $, where $N[v]$ is the closed neighborhood of $v$. We consider the
closed distance magic graphs in the algebraic context. In particular we analyze
the relations between the closed distance magic labelings and the spectra of
graphs. These results are then applied to the strong product of graphs with
complete graph or cycle and to the circulant graphs. We end with a number
theoretic problem whose solution results in another family of closed distance
magic graphs somewhat related to the strong product.
