  We describe the centralizer of irreducible representations from a finitely
generated group $\Gamma$ to $PSL(p,\mathbb{C})$ where $p$ is a prime number.
This leads to a description of the singular locus (the set of conjugacy classes
of representations whose centralizer strictly contains the center of the
ambient group) of the irreducible part of the character variety
$\chi^i(\Gamma,PSL(p,\mathbb{C}))$. When $\Gamma$ is a free group of rank
$l\geq 2$ or the fundamental group of a closed Riemann surface of genus $g\geq
2$, we give a complete description of this locus and prove that this locus is
exactly the set of algebraic singularities of the irreducible part of the
character variety.
