What is the integer form of a projector into the intersection of the ranges of two integer projection matrices?

Consider two square integer matrices $X$ and $Y$ of the same dimension with the following properties:

$X^2=rX$, and $Y^2=sY$ for integers $r$ and $s$. The $\gcd$ of the entries of $X$ is 1 and the $\gcd$ of the entries of $Y$ is 1. In addition, there exists an invertible matrix $K$ such that $X^TK=KX$ and $Y^TK=KY$.

I am looking for the (possibly 'an') integer matrix $Z$ such that the range of $Z$ is the intersection of the ranges of $X$ and $Y$ and $Z^2=tZ$ for integer $t$. I am particularly interested in finding the smallest possible value of $t$.

What I have so far:

I think that the above properties of $X$ and $Y$ mean that the matrices $X/r$ and $Y/s$ are orthogonal projectors with respect to the metric $K$. If this is true, then the Anderson-Duffin formula says that $P=2\frac{X}{r}(\frac{X}{r}+\frac{Y}{s})^+\frac{Y}{s}$ is a projector onto the intersection of the ranges of $X$ and $Y$. $(\frac{X}{r}+\frac{Y}{s})^+$ indicates the psuedoinverse of $(\frac{X}{r}+\frac{Y}{s})$. If I knew the smallest integer by which I could multiply P and have an integer matrix, then that integer would be $t$ and I'd have $Z=tP$.

My guess is that $t$ will be something simple, like the $\gcd$ or $\rm{lcm}$ of $r$ and $s$, but I'm having trouble proving it, so I would appreciate any help.

-
I might be missing something but if $P$ is a projection, then $P^2=P$, so $t=1$? – Mustafa Said Jan 25 '13 at 11:55
P is a projector, but not necessarily integer. – David Clarke Mar 28 '13 at 22:24
Do you assume that $K$ is an integer matrix ? Do you allow $Z=0$ and $t=0$, if the intersection of the ranges of $X$ and $Y$ is zero ? Then $t$ has nothing to do with $r$ and $s$. – Dietrich Burde Apr 8 '13 at 15:43