The correct option is A x2+y2−x−y=0
The equation of the line is
y = x ......(i)
and the equation of the circle is
x2+y2−2x=0 .......(ii)
On solving (i) and (ii), we get
x2+x2−2x=0⇒2x2−2x=0⇒2x(x−1)=0⇒x=0, x=1When x=0, y=0.When x=1, y=1.∴
the coordinates of A are (0, 0) and the coordintes of B are (1, 1).
Therefore, the equation of the circle (with AB as a diameter) is
(x−x1)(x−x2)+(y−y1)(y−y2)=0⇒(x−0)(x−1)+(y−0)(y−1)=0⇒x(x−1)+y(y−1)=0⇒x2+y2−x−y=0