# Diagonal of kernel

Suppose that $K:L^2([0,1],\mathbb C)\to L^2([0,1],\mathbb C)$ is an integral operator given by $$Kf(x)=\int_0^1k(x,y)f(y)dy$$ for each $f\in L^2([0,1],\mathbb C)$ and $x\in[0,1]$. In general, the values of $q(x)=k(x,x)$ for $x\in[0,1]$ are not determined by the operator $K$ (not even almost everywhere) and it makes no sense to define the function $g$ or to investigate the integral $\int_0^1q(x)dx$ (see this related question).

Let assume that the integral operator $K=\varphi\otimes\gamma$, where $\varphi,\gamma\in L^2([0,1],\mathbb C)$ and the operator $\varphi\otimes\gamma$ is defined as $\varphi\otimes\gamma=\langle\cdot,\gamma\rangle\varphi$. The kernel of $\varphi\otimes\gamma$ is given by $\varphi(x)\overline\gamma(y)$ for each $x,y\in[0,1]$. Now the function $q(x)=\varphi(x)\overline\gamma(x)$ for $x\in[0,1]$ is actually well defined almost everywhere and the operator $\varphi\otimes\gamma$ determines the value of the integral $\int_0^1q(x)dx$. So it makes sense to define the function $q(x)=\varphi(x)\overline\gamma(x)$ for $x\in[0,1]$ in this particular situation.

I think that in the general case the definition of $q(x)=k(x,x)$ depends on the set that has measure zero (i.e. $\{(x,y)\in[0,1]^2:x=y\}$). So we can change the values of the kernel on this set without affecting the operator $K$. However, if we investigate the operator $\varphi\otimes\gamma$ and define $q(x)=\varphi(x)\overline\gamma(x)$ for $x\in[0,1]$, we do not have this problem anymore since $\varphi$ and $\gamma$ are well-defined almost everywhere.

Is my reasoning correct? Is the diagonal of the kernel given by $q(x)=\varphi(x)\overline\gamma(x)$ well-defined (in the almost everywhere sense)?

Any help is much appreciated!