How do we know that #sqrt(7)# is irrational?
For a start, #7# is a prime number, so its only positive integer factors are #1# and #7#.
Next suppose #sqrt(7) = p/q# for some positive integers #p# and #q#.
Suppose further that #p/q# is in lowest terms - that is #p# and #q# have no common factor apart from #1#. If this were not so, then we could just divide #p# and #q# by that common factor.
Since we are given #sqrt(7) = p/q#, it follows that:
#p^2/q^2 = sqrt(7)^2 = 7#
Multiply both ends by #q^2# to get:
#p^2 = 7 q^2#
Since #q# is a positive integer, #7q^2# is a positive integer divisible by #7#.
So #p^2# is a positive integer divisible by #7#.
But if #p^2# is divisible by #7#, then #p# must be divisible by #7# (since #7# is prime).
So #p = 7k# for some positive integer #k#.
Then we have #7q^2 = p^2 = (7k)^2 = 7*7k^2#
Divide both ends by #7# to get:
#q^2 = 7k^2#
Since #k# is a positive integer, #7k^2# is a positive integer multiple of #7#. So #q^2# is divisible by #7#.
Since #q^2# is divisible by #7#, #q# must be divisible by #7# (since #7# is prime).
So both #p# and #q# are divisible by #7#, contradicting the assumption that they were both in lowest terms.
So our original supposition must be wrong and there are no integers #p#, #q# such that #p/q = sqrt(7)#