Step 1: Understanding the Concept
A circle passing through the vertices of a triangle is its circumcircle. The general equation of a circle is $x^2 + y^2 + 2gx + 2fy + c = 0$. We substitute the three points into this equation to find the constants.
Step 2: Substituting the Points
1. Passes through (0,0): $0^2 + 0^2 + 2g(0) + 2f(0) + c = 0 \implies c = 0$.
2. Passes through (3,1): $3^2 + 1^2 + 2g(3) + 2f(1) = 0 \implies 6g + 2f = -10$.
3. Passes through (1,3): $1^2 + 3^2 + 2g(1) + 2f(3) = 0 \implies 2g + 6f = -10$.
Step 3: Solving the Equations
Subtracting the two equations: $(6g + 2f) - (2g + 6f) = -10 - (-10) = 0$.
$4g - 4f = 0 \implies g = f$.
Substitute $g = f$ into $6g + 2g = -10 \implies 8g = -10 \implies g = -5/4$.
Thus, $f = -5/4$.
The equation is $x^2 + y^2 + 2(-5/4)x + 2(-5/4)y = 0$.
$x^2 + y^2 - \frac{5}{2}x - \frac{5}{2}y = 0$.
Multiplying by 2: $2x^2 + 2y^2 - 5x - 5y = 0$.
Step 4: Final Answer
The equation of the circle is \( 2x^{2} + 2y^{2} - 5x - 5y = 0 \).