Equation of circle is x2+y2=r2
Let the line xa+yb=1 intersect the circle at A and B
Draw OC perpendicular to AB
OC=|0+0−1|√1a2+1b2=ab√a2+b2
In △OAC , OA2=AC2+OC2
⇒r2=(ab√a2+b2)2+AC2
⇒AC2=r2−a2b2a2+b2
⇒AC2=r2(a2+b2)−a2b2a2+b2
⇒AC=√r2(a2+b2)−a2b2a2+b2
length of chord =AB=2AC
⇒AB=2√r2(a2+b2)−a2b2a2+b2