I know the definition of $K\_X$ on a normal, singular variety, but I don't have a good set of examples in my mind. What's an example of a variety where $K\_X$ is $\mathbb Q$-Cartier but not Cartier? Are there any conditions under which an adjunction formula lets me compute the canonical class of a singular divisor?



Example of a variety with $K_X$ $\mathbb Q$-Cartier but not Cartier
**Note:** I added an addendum below in response to *quinque*'s comment and the subsequent discussion of the issue (s)he raised on math.stackexchange (see the link in *quinque*'s comment).




---


An easy way to produce a $\mathbb Q$-Cartier but not Cartier canonical divisor is by a quotient. For instance for the quotient
$$X=\mathbb A^3/(x,y,z)\sim (-x,-y,-z)$$ 
$2K\_X$ is Cartier, but $K\_X$ is not. 


I leave it for you to prove that $2K\_X$ is Cartier. Here is how to see that $K\_X$ is *not*:
Clearly $X={\rm Spec}k[x^2,y^2,z^2,xy,yz,xz]$ in other words, $X$ is the affine cone over the Veronese surface $\mathbb P^2\simeq V\subset \mathbb P^5$. Blowing up the cone point gives a resolution of singularities $\pi: Y\to X$ with exceptional divisor $E\simeq V$. In fact $E^2\sim -2L$ where $L$ is the class of a line. This follows by considering the blow up as a blow up of the ambient $\mathbb A^6$ (the cone over $\mathbb P^5$) and noticing that the square of the exceptional divisor of the blow up of $\mathbb A^6$ is $-1$-times the hyperplane in $\mathbb P^5$ which restricts to a conic on $Y$. Now write $$K\_Y\sim\_{\mathbb Q} \pi^\*K\_X + aE \tag{$\star$}$$ and use the adjunction formula ($Y$ is smooth!) to get 
$$
(a+1)E^2\sim K\_E=K\_{\mathbb P^2} \sim -3L.
$$
Solving for $a$ shows that $a=\dfrac 12$ which shows that $K\_X$ cannot be Cartier. 




---


**Addendum** (**a.k.a. Intermezzo**): *quinque* raised the interesting point that $\dfrac 12 E$ is actually $\mathbb Q$-linearly equivalent to a Cartier divisor, so (s)he was worried that then the above does not prove that $K\_X$ is not Cartier. It actually does, but this points to an interesting consequence, namely that this means that $\pi^\*K\_X$ is actually numerically equivalent to a Cartier divisor, so using only intersection numbers one will not be able to prove that it is not Cartier. 


Anyway, here is why the above implies that $K\_X$ is not Cartier: Suppose it is. That means that $\omega\_X$ is the trivial line bundle in a neighborhood of the singular point. Consider the pull-back of a local generator. On $Y\setminus E$ this will generate $\omega\_Y$ and hence the corresponding (integral!) divisor $\pi^\*K\_X$ is equal (not just linearly equivalent!!) to $K\_Y+bE$ for some $b\in \mathbb Z$. Then the same calculation as above implies that $b=-a=-\dfrac 12$ which is a contradiction. 


The point is that if $K\_X$ is Cartier, then ($\star$) holds with linear equivalence, and in fact with equality, instead of $\mathbb Q$-linear equivalence and hence $a$ has to be an integer in that case. 




---


Also interesting to note that the same construction does not give a desired example in dimension $2$: The quotient $\mathbb A^2/(x,y)\sim(-x,-y)$ is a cone over a conic which is a surface in $\mathbb P^3$. In particular it is Gorenstein and hence $K\_X$ is Cartier.


On the other hand, one gets a $2$-dimensional example by $\mathbb A^2/\mu\_3$ where $\mu\_3$ acts by multiplication by a primitive third root of unity. The proof is essentially the same as above. It is relatively easy to see (just as above) that this is the same as the cone over a twisted cubic. 


As for the adjunction formula, it definitely works as long as $K\_X+D$ is Cartier and it works up to torsion if it is $\mathbb Q$-Cartier. If it is not $\mathbb Q$-Cartier, it is not clear what the adjunction formula should mean, but even then one can have a sort of adjunction formula involving $\mathscr Ext$'s but this is almost Grothendieck Duality then.


