Suppose for the sake of contradiction that $\sqrt{3}$ is rational. Then $\sqrt{3} = p/q$ for $p,q \in \mathbb{Z}$. Also assume that $p$ and $q$ have no common divisor, thus $p$ and $q$ can't both be even.
So, $\sqrt{3} = p/q \implies 3 = p^2/q^2 \implies p^2 = 3q^2 \implies 2p^2 = 6q^2 \implies 2p^2 = 2(3q^2).$
Since $2p^2$ is even, it follows that $p$ is even. Thus, $p=2k$ for some $k\in \mathbb{Z}$.
So we have $2p^2 = 2(3q^2) \implies 2(2k)^2 = 2(3q^2) \implies 8k^2 = 6q^2 \implies 2(4k^2) = 6q^2.$
Since $6q^2$ is even, it follows that $q$ is even. But $p$ and $q$ can't both be even, thus we have a contradiction.