I apologize for this kind of silly question, I haven't brushed up on QM for a while.
I was looking at a problem today, essentially I'm given some operator $V = \lambda |{\xi}\rangle \langle{\xi}|$ where $|{\xi}\rangle$ is normal such that $\langle p| {\xi}\rangle = e^{-p^2/\lambda^2}$ where $\{|p\rangle\}$ are momentum eigenstates (I'm working in 3D space where $p^2 = \vec{p} \cdot \vec{p}$ but will refrain from using vector notation). Essentially, I have to find some integral that contains $V(r)$, which is the position representation of the operator $V$.
Now my concern is not the problem itself (as it's just an exercise I wanted to do for fun), but what exactly is meant by the position representation of an operator. At first I thought it should be as simple as $$V(r) = \langle r' | V |r\rangle \ \ \ \ \ \ (1)$$ With $|r\rangle$ being the position eigenstates and then I can insert momentum basis identities to simplify. This is 'equivalent' to the matrix elements of an operator in case of discrete bases. But I remember from one of my textbooks that, the position representation of momentum operator is found using
$$\langle r| \hat{p} | \psi \rangle = -i\hbar \nabla \langle r|\psi\rangle$$
Where then one identifies $\hat{p} =-i\hbar \nabla$ suggesting that the position representation of an operator is found through the relation $$\langle r| V \psi \rangle = V(r) \langle r| \psi \rangle \ \ \ \ (2)$$ for all $|\psi\rangle$, which kinda makes sense, if one identifies $V|\psi\rangle = |\psi' \rangle$, then this says $V(r) \psi(r) = \psi'(r)$, or that $V(r)$ maps functions from position space to position space. Is this what the position representation of the operator $V$ mean?
I apologize for making the question so long and verbose, but I'm afraid I may be confusing some concepts. Does (1) represent the matrix elements of V in position basis, and one finds the position representation of V through (2), and they are different (since they don't seem compatible)? Is none of them actually what we mean by $V(r)$, like the potential $V(r)$ in Schrodinger's eqn.? I've always taken the fact that we know $V(r)$ as a function of position for granted and this problem is giving me semi existential crisis.