# I want to solve the intersections of two circles using matrices.

The equations of the circles are
$$(x-h_1)^2+(y-y_1)^2=r_1^2$$
and
$$(x-h_2)^2+(y-y_2)^2=r_2^2$$
If I can use matrices to solve for $$(x,y)$$, how? Also, I know there will be two answers. The one I am looking for is the one with the greater $$y$$ value, if that helps any.

CONTEXT: I am trying to bilaterate (altered version of triangulation) and that is basically how. I am also programming this and have already found a working method. However, this program does not calculate decimals accurately. I am hoping that solving this problem with matrices will allow me to calculate decimals with accuracy (hopefully to the thousandths or ten thousandths).

• $x$ and $y$ aren't generally linear functions of $h_i, y_i, r_i$, so I'm not sure what you want to do is possible. This question may help: math.stackexchange.com/questions/256100/… – Connor Harris Nov 30 '18 at 20:06
• If your program doesn’t “calculate decimals,” what makes you think that using matrices will somehow do that? Sounds like the real problem might be using ints when you should be using floating-point. – amd Nov 30 '18 at 20:09
• Check edit. Matrices might be a more straightforward approach to the problem instead of the one I am currently using. – ARCS2016 Nov 30 '18 at 20:12
• Connor Harris, I did check that out and am currently using a system similar to what is described in the top answer. – ARCS2016 Nov 30 '18 at 20:15
• If you insist on “using matrices,” then one approach is to reduce to a conic-line intersection problem by subtracting one circle equation from the other and then using one of the methods in the answers to this question. IMO, this is overkill for a circle-circle intersection, which can be computed straightforwardly by intersecting the radical axis with the line through the centers and applying the Pythagorean theorem. – amd Nov 30 '18 at 20:59