let us assume that √31 be rational.
then it must in the form of p / q [q ≠ 0] [p and q are co-prime]
√31 = p / q
=> √31 x q = p
squaring on both sides
=> 31q2= p2 ------> (1)
p2 is divisible by 31
p is divisible by 31
p = 31c [c is a positive integer] [squaring on both sides ]
p2 = 961 c2 --------- > (2)
subsitute p2 in equ (1) we get
31q2 = 961 c2
q2 = 31c2
=> q is divisble by 31
thus q and p have a common factor 31.
there is a contradiction
as our assumsion p & q are co prime but it has a common factor.
so that √31 is an irrational.