  A graph $G=(V,E)$ is said to be distance magic if there is a bijection $f$
from a vertex set of $G$ to the first $|V(G)|$ natural numbers such that for
each vertex $v$, its weight given by $\sum_{u \in N(v)}f(u)$ is constant, where
$N(v)$ is an open neighborhood of a vertex $v$. In this paper, we introduce the
concept of $p$-distance magic labeling and establish the necessary and
sufficient condition for a graph to be distance magic. Additionally, we
introduce necessary and sufficient conditions for a connected regular graph to
exhibit distance magic properties in terms of the eigenvalues of its adjacency
and Laplacian matrices. Furthermore, we study the spectra of distance magic
graphs, focusing on singular distance magic graphs. Also, we show that the
number of distance magic labelings of a graph is, at most, the size of its
automorphism group.
