Given three coordinates (a,b,c), (d,e,f), and (l,m,n), what is the center of the circle in the 3D plane (h,k,i) that contains these three points. I have tried the following:
$$(a-h)^2+(b-k)^2+(c-i)^2=r^2$$
$$(d-h)^2+(e-k)^2+(f-i)^2=r^2$$
$$(l-h)^2+(m-k)^2+(n-i)^2=r^2$$
Subtracted equation 2 from 1, equation 3 from equation 2, and equation 3 from equation 1 to get:
$$2(a-d)h+2(b-e)k+2(c-f)i=a^2-d^2+b^2-e^2+c^2-f^2$$
$$2(d-l)h+2(e-m)k+2(f-n)i=d^2-l^2+e^2-m^2+f^2-n^2$$
$$2(a-l)h+2(b-m)k+2(c-n)i=a^2-l^2+b^2-m^2+c^2-n^2$$
Closer inspection revealed to me that the left side formed a 3 x 3 matrix and the left a 3 by 1 matrix.
Tried solving for $(h,k,i)$ by taking the inverse of the left side matrix and multiplying that by the right side 3 by 1 matrix, but it turns out the left side matrix's rows are dependent, so the determinant of the left side matrix is 0 (singular matrix); hence, no inverse.
Please guide me as to solve this problem.
Thank you in advance.

For points $(a,b,c)$ and $(d,e,f)$, their perpendicular bisector can be found by:
$$\begin{align*}
(x-a)^2 + (y-b)^2+(z-c)^2 &= (x-d)^2 + (y-e)^2 + (z - f)^2\\
a^2-2ax+b^2-2by+c^2 -2cz &= d^2 - 2dx + e^2 - 2ey + f^2 - 2fz\\
2(a-d)x +2(b-e)y + 2(c-f)z &= a^2+b^2+c^2-d^2-e^2-f^2
\end{align*}$$
Do the same and find the perpendicular bisector of $(d,e,f)$ and $(l,m,n)$.
For three points $(a,b,c)$, $(d,e,f)$ and $(l,m,n)$, their common plane $px+qy+r = z$ can be found by:
$$\begin{pmatrix}
a&b&1\\d&e&1\\l&m&1
\end{pmatrix}\begin{pmatrix}
p\\q\\r
\end{pmatrix} = \begin{pmatrix}
c\\f\\n
\end{pmatrix}$$
This might have some problem if their common plane is perpendicular with the $xy$-plane, but you can always change to use $x$ or $y$ to be the subject of the equation and try to solve again. You are using a computer anyway.
Now you have three equations in the form of $tx + uy + vz = w$, and you should be able to solve for their intersection $(x,y,z) = (h,k,i)$.
