# How would you find the equation on mathematica

**URL:** <https://community.wolfram.com/t/how-would-you-find-the-equation-on-mathematica/3787>\
**Category:** Questions\
**Tags:** mathematica, algebra, equation-solving, geometry\
**Created:** [October 26, 2014, 9:20pm UTC](https://community.wolfram.com/t/how-would-you-find-the-equation-on-mathematica/3787 "2014-10-26T21:20:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon\_91240867](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anon\_91240867](https://community.wolfram.com/u/anon_91240867)\
**Post date:** [October 26, 2014, 9:20pm UTC](https://community.wolfram.com/t/how-would-you-find-the-equation-on-mathematica/3787/1 "2014-10-26T21:20:22Z")

</div>

Find the equation of a circle that contains points (4,-3),(-4,5), and (-2,7)

---

<div class="post-metadata">

**Author:** ![mthiel](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mthiel/32/42877_2.png) [@mthiel](https://community.wolfram.com/u/mthiel)\
**Post date:** [October 26, 2014, 9:45pm UTC](https://community.wolfram.com/t/how-would-you-find-the-equation-on-mathematica/3787/2 "2014-10-26T21:45:16Z")

</div>

Hi,

what about this? First we generate a list of the points:

```
points = {{4, -3}, {-4, 5}, {-2, 7}}

```

Then we generate the equations:

```
Table[(x - a)^2 + (y - b)^2 == R^2 /. {x -> points[[i, 1]], y -> points[[i, 2]]}, {i, 1, 3}]

```

which gives

```
{(4 - a)^2 + (-3 - b)^2 == R^2, (-4 - a)^2 + (5 - b)^2 == R^2, (-2 - a)^2 + (7 - b)^2 == R^2}

```

Note that we used the general form of the [equation that generates a circle](http://en.wikipedia.org/wiki/Circle). These determine the unknowns a,b,R.

```
sols = Solve[Table[(x - a)^2 + (y - b)^2 == R^2 /. {x -> points[[i, 1]], y -> points[[i, 2]]}, {i, 1, 3}], {a, b, R}]

```

That gives

```
{{a -> 1, b -> 2, R -> -Sqrt[34]}, {a -> 1, b -> 2, R -> Sqrt[34]}}

```

It is easy to check that the circle

```
((x - a)^2 + (y - b)^2 == R^2 /. sols[[2]])

```

which is

```
(-1 + x)^2 + (-2 + y)^2 == 34

```

fulfils the conditions:

```
Table[((x - a)^2 + (y - b)^2 == R^2 /. sols[[2]]) /. {x -> points[[i, 1]], y -> points[[i, 2]]}, {i, 1, 3}]

```

evaluates to

```
{True, True, True}

```

Cheers,

Marco
