For a complex n×n matrix T and a vector x∈Cn, we denote by σT(x) (respectively, by rT(x)) the local spectrum (respectively, the local spectral radius) of T at x. We prove that φ:Mn→Mn linear has the property that for each T∈Mn there exists a nonzero xT∈Cn such that σφ(T)(xT)=σT(xT) if, and only if, there exists A∈Mn invertible such that either φ(T)=ATA−1 for each T∈Mn, or φ(T)=ATtA−1 for each T∈Mn. Modulo a multiplication by a unimodular complex number, we arrive at the same conclusion by supposing that for each T∈Mn there exists a nonzero xT∈Cn such that rφ(T)(xT)=rT(xT).