title: Circumscribed circle of a triangle in 2D
body: <p>I've been struggling with this : how to get the center and radius of the circumscribed circle of a triangle (in 2D) ?
  What I have done so far :</p>
  <p><a href="https://i.stack.imgur.com/TFs3m.jpg" rel="nofollow noreferrer">I used the 1.5 linear system that is easily computable, however my implementation does not work at all...</a></p>
  <p>My code (in python, using numpy for convenience):</p>
  <pre><code>def cercle_circonscrit(T):
     A = np.array([[x3-x1,y3-y1],[x3-x2,y3-y2]])
     Y = np.array([(x3**2 + y3**2 - x1**2 - y1**2),(x3**2+y3**2 - x2**2-y2**2)])
     if np.linalg.det(A) == 0:
         return False
     Ainv = np.linalg.inv(A)
     X = 0.5*np.dot(Ainv,Y)
     x,y = X[0],X[1]
     r = sqrt((x-x1)**2+(y-y1)**2)
     return (x,y),r
  </code></pre>
  <p>So far this returns inexplicable results... however I did not try to prove the above formula, which might be false...
  Thanks</p>