Square Root of a 2x2 Matrix
Given P, Q, R, S, we wish to solve the following equation for a, b, c, and d
\begin{bmatrix}
a & b \\
c & d
\end{bmatrix}^2=
\begin{bmatrix}
P & Q \\
R & S
\end{bmatrix}
We will find that solutions naturally divide into six cases:
I...... Q = R = 0
II..... Q = 0
III.... R = 0
IV... P + S = 0
V.... (P−S)2 + 4QR = 0
VI... [(P−S)2+4QR]ξ2 + 2QR(P+S)ξ + Q2R2 = 0
where ξ = a2 − P. Note that it is assumed that each case excludes the ones above it.
we have
a2 + bc = P
b(a+d) = Q
c(a+d) = R
d2 + bc = S
Notice that we have every combination of three variables; abc, abd, acd, bcd, giving us four equations with four unknowns.
If we multiply the second equation by c and the third equation by b we find that bR = cQ.
From this we can find the relationships between every pair of variables
a2Q + b2R = PQ
a2R + c2Q = PR
a2 − d2 = P − S
bR − cQ = 0
b2R + d2Q = QS
c2Q + d2R = RS
The equations used to form these is based on the three (not four) sets of equations; (\ref{sqrabd}) \& (\ref{sqracd}), (\ref{sqrabc}), and (\ref{sqrabc}) - (\ref{sqrbcd}), so if one tries to solve these six equations for a single variable, one will find themselves on a merry-go-round. We still need to use one of the equations of (\ref{sqr}). Equation (\ref{sqrabc}) was already used, and it can be shown that it is not useful to use (\ref{sqrbcd}) either, so that leaves us with (\ref{sqrabd}) or (\ref{sqracd}). We choose (\ref{sqrabd}). This gives us \begin{subequations} \label{sqrw} \begin{gather} b(a+d)=Q \label{sqrwa}\\ a^2Q+b^2R=PQ \label{sqrwb}\\ a^2-d^2=P-S \label{sqrwc}\\ b^2R+d^2Q=QS \label{sqrwd} \end{gather} \end{subequations} Notice that all but the first equation involves the squares of the desired variables. To make things copacetic we put (\ref{sqrwa}) in square-only form \begin{equation} 2ab^2d=Q^2-b^2(a^2+d^2) \end{equation} \begin{equation} 4a^2b^4d^2=[Q^2-b^2(a^2+d^2)]^2 \end{equation} Now we cut the exponents of the variables a, b, d in half; rewriting them in a different font, just to make things less cluttered. We do the same for equations (\ref{sqrwb}), (\ref{sqrwc}), and (\ref{sqrwd}). We now have \begin{subequations} \label{sqrsimplify} \begin{gather} 4\mathcal{A}\mathcal{B}^2\mathcal{D}=[Q^2-\mathcal{B}(\mathcal{A}+ \mathcal{D})]^2\label{sqrsimplifya}\\ \mathcal{A}Q+\mathcal{B}R=PQ \label{sqrsimplifyb}\\ \mathcal{A}-\mathcal{D}=P-S \label{sqrsimplifyc}\\ \mathcal{B}R+\mathcal{D}Q=QS \label{sqrsimplifyd} \end{gather} \end{subequations} The last three equations are linear. Unfortunately they are not independent, but they are of only two `unknown' variables each which makes them convenient for substitution into (\ref{sqrsimplifya}). Let's try solving for \mathcal{A}. Equation (\ref{sqrsimplifyd}) is not used in this case. Had we wished to solve for \mathcal{D} then (\ref{sqrsimplifyb}) would have been the odd man out. In either case we end up properly with three independent equations with three unknowns.\\First we multiply equation (\ref{sqrsimplifya}) by R^2. At the same time we'll substitute \mathcal{A}-P+S for \mathcal{D} \begin{equation} 4\mathcal{A}(\mathcal{B}R)^2(\mathcal{A} - P+S) = [Q^2R - (\mathcal{B}R)(2\mathcal{A} - P + S)]^2 \end{equation} Substituting \mathcal{B}R = Q(P - \mathcal{A}) into the above we have \begin{equation} 4\mathcal{A}Q^2(P - \mathcal{A})^2(\mathcal{A} - P + S) = [Q^2R - Q(P - \mathcal{A})(2\mathcal{A} - P + S)]^2\label{qforce} \end{equation} We re-write this as \begin{equation} Q^2[4\mathcal{A}(P - \mathcal{A})^2(\mathcal{A} - P + S)] = Q^2[QR - (P - \mathcal{A})(2\mathcal{A} - P + S)]^2\label{qprime} \end{equation} One solution to this is Q=0. But had we made the choice for (\ref{sqracd}) instead of (\ref{sqrabd}) we would have worked with the following set of equations instead of equations (\ref{sqrwa}) through (\ref{sqrwd})\ldots \begin{subequations} \begin{gather} c(a+d)=R\\ a^2R+c^2Q=PR\\ a^2-d^2=P-S\\ c^2Q+d^2R=RS \end{gather} \end{subequations} Which would have led us to the equation \begin{equation} R^2[4\mathcal{A}(P - \mathcal{A})^2(\mathcal{A} - P + S)] = R^2[QR - (P - \mathcal{A})(2\mathcal{A} - P + S)]^2\label{rprime} \end{equation} In what almost sounds like a joke\ldots If R is zero refer to equation (\ref{qprime}). If Q is zero refer to equation (\ref{rprime}). We cannot however escape the fact that Q and R may both be zero\ldots So either \begin{equation} Q=R=0 \end{equation} or \begin{equation} 4\mathcal{A}(P - \mathcal{A})^2(\mathcal{A} - P + S) = [QR - (P - \mathcal{A})(2\mathcal{A} - P + S)]^2\label{qrnz} \end{equation} For the sake of other degenerate cases we actually need to find solutions for all three instances; Q=R=0, Q=0, and R=0.\\ In any case we now have an equation in \mathcal{A} only. Expanding the right side of equation (\ref{qrnz}) we have \begin{equation} 4\mathcal{A}(P - \mathcal{A})^2(\mathcal{A} - P + S) = \end{equation} 'Q^2R^2 + (P - \mathcal{A})^2(2\mathcal{A} - P + S)^2 - 2(P - \mathcal{A})(2\mathcal{A} - P + S)QR' Collecting terms in (P - \mathcal{A})^2\ldots \begin{equation} (P - \mathcal{A})^2[(2\mathcal{A} - P + S)^2 - 4\mathcal{A}(\mathcal{A} - P + S)] + Q^2R^2 - 2(P - \mathcal{A})(2\mathcal{A} - P + S)QR = 0 \label{quad1} \end{equation} Lets work on the factor \begin{equation} (2\mathcal{A} - P + S)^2 - 4\mathcal{A}(\mathcal{A} - P + S) \end{equation} We re-write this as \begin{equation} [\mathcal{A} + (\mathcal{A} - P + S)]^2 - 4\mathcal{A}(\mathcal{A} - P + S) \end{equation} Now expand\ldots \begin{equation} \mathcal{A}^2 + (\mathcal{A} - P + S)^2 + 2\mathcal{A}(\mathcal{A} - P + S) - 4\mathcal{A}(\mathcal{A} - P + S) \end{equation} \begin{equation} =\mathcal{A}^2 - 2\mathcal{A}(\mathcal{A} - P + S)+(\mathcal{A} - P + S)^2 \end{equation} \begin{equation}
[\mathcal{A} - (\mathcal{A} - P + S)]^2
(P - S)^2 \end{equation} Putting this into (\ref{quad1}) we have \begin{equation} (P-\mathcal{A})^2(P-S)^2+Q^2R^2-2(P-\mathcal{A})(2\mathcal{A} - P + S)QR = 0 \end{equation} Which is a quadratic equation. In order to put it into standard form we change the (P-\mathcal{A})'s into (\mathcal{A}-P)'s\ldots \begin{equation} (\mathcal{A}-P)^2(P-S)^2+2(\mathcal{A}-P)(2\mathcal{A}-P+S)QR+Q^2R^2=0 \end{equation} Rather than factoring the above completely, we choose to solve in terms of \begin{equation} \xi=\mathcal{A}-P \end{equation} we have then \begin{equation} (P-S)^2\xi^2+2QR\xi(2\xi+P+S)+Q^2R^2=0 \end{equation} We now have a quadratic equation in standard form\ldots \begin{equation} [(P-S)^2+4QR]\xi^2+2QR(P+S)\xi+Q^2R^2=0\label{quadratic} \end{equation} Before solving this in general, we take care of the degenerate cases\ldots \begin{tabbing} \textbf{(I)} Q=R=0\\ \\ \indent from equations (\ref{sqrabc}) to (\ref{sqrbcd})\ldots\\ \indent a^2+bc=P\\ \indent b(a+d)=0\\ \indent c(a+d)=0\\ \indent d^2+bc=S\\ \\ \indent So either a+d=0 or b=c=0\\ \indent \textbf{a)}\ \ \=a+d=0\\ \>(a+d)(a-d)=P-S\\ \>So P=S\\ \>We have then\ldots \end{tabbing} \begin{equation} \left(\begin{array}{rr} P&0\\ 0&P\\ \end{array}\right)^{1/2}= \left(\begin{array}{rr} a&b\\ c&-a\\ \end{array}\right)\end{equation} \begin{tabbing} \indent\= \ \ \ \ \ \= For any a, b, c, such that a^2+bc=P\\ \\ \> \textbf{b)} \> b=c=0\\ \> \> a^2=P, \ \ d^2=S\\ \> \> So for P\ne S\ldots\\ \end{tabbing} \begin{equation}\left(\begin{array}{rr} P&0\\ 0&S\\ \end{array}\right)^{1/2}= \left(\begin{array}{rr} \pm\sqrt{P}&0\\ 0&\pm\sqrt{S}\\ \end{array}\right)\end{equation} \begin{tabbing} \indent\= \ \ \ \ \ \= (There are four solutions; \pm S, \mp S etc. are equally valid). This \\ \> \> solution is valid for P=S but is not a general solution as in (a) \\ \> \> above. \end{tabbing} \noindent \textbf{(II)}\ \ Q=0,\ \ R\ne 0\\ \\ \indent\ \ a^2+bc=P\\ \indent\ \ b(a+d)=0\\ \indent\ \ c(a+d)=R\\ \indent\ \ d^2+bc=S\\ \\ \indent\ \ a+d\ne 0\ \ \ \therefore\ \ \ b=0,\ \ \ a=\pm\sqrt{P},\ \ \ d=\pm\sqrt{S}\\ \\ \indent\ \ so c(\pm\sqrt{P}\pm\sqrt{S})=R.\\ \indent\ \ \textbf{a)}\ \ If P=S=0 there are no solutions.\\ \\ \indent\ \ \textbf{b)}\ \ If P=S\ne0 then we have two solutions, which are \begin{equation}\left(\begin{array}{cc} P&0\\ R&P\\ \end{array}\right)^{1/2}= \pm\left(\begin{array}{cc} \sqrt{P}&0\\ R/(2\sqrt{P})&\sqrt{P} \end{array}\right)\end{equation} \indent\ \ \textbf{c)}\ \ P\ne S (neither of which are zero)\\ \indent\ \ \ \ \ \ We are assured then that \pm\sqrt{P}\pm\sqrt{S}\ne0, so there is no conflict in\\ \indent\ \ \ \ \ \ writing\ldots \begin{equation} c=\frac{R}{\pm\sqrt{P}\pm\sqrt{S}} \end{equation} \indent\ \ \ \ \ \ We have then \begin{equation}\left(\begin{array}{rr} P&0\\ R&S\\ \end{array}\right)^{1/2}= \left(\begin{array}{cc} \pm\sqrt{P}&0\\ R/(\pm\sqrt{P}\pm\sqrt{S})&\pm\sqrt{S}\\ \end{array}\right) \end{equation} \indent\ \ \ \ \ \ Where the \pm's in the P's are consistent with each other but act\\ \indent\ \ \ \ \ \ independently of the S's. Likewise the Ss with the Ps. In other\\ \indent\ \ \ \ \ \ words the above is four solutions.\\ \\ \textbf{(III)} R=0,\ \ Q\ne 0\\ \\ \indent\ \ \ \ In comparison with the above solutions, symmetry dictates that\ldots\\ \\ \indent\ \ \ \ \textbf{a)}\ \ If P=S=0 there are no solutions.\\ \\ \indent\ \ \ \ \textbf{b)}\ \ If P=S\ne0 then we have two solutions, which are \begin{equation}\left(\begin{array}{cc} P&Q\\ 0&P\\ \end{array}\right)^{1/2}= \pm\left(\begin{array}{cc} \sqrt{P}&Q/(2\sqrt{P})\\ 0&\sqrt{P} \end{array}\right)\end{equation} \indent\ \ \ \ \textbf{c)}\ \ P\ne S (neither of which are zero)\\ \begin{equation}\left(\begin{array}{rr} P&Q\\ 0&S\\ \end{array}\right)^{1/2}= \left(\begin{array}{cc} \pm\sqrt{P}&Q/(\pm\sqrt{P}\pm\sqrt{S})\\ 0&\pm\sqrt{S}\\ \end{array}\right) \end{equation} \noindent \begin{tabbing} \indent\ \ \ \ Which represents four solutions.\\ \end{tabbing} \textbf{(IV)} P+S=0,\ \ QR\ne 0\\ \\ \indent \ \ \ Equation (\ref{quadratic}) becomes \begin{equation} 4(P^2+QR)\xi^2=-Q^2R^2 \end{equation} \indent \ \ \ Since QR\ne 0,\ \ P^2+QR\ne 0,\ \ so \begin{equation} \xi^2=(a^2-P)^2=\frac{-Q^2R^2}{4(P^2+QR)} \end{equation} \begin{equation} a^2-P=\frac{\pm iQR}{2\sqrt{P^2+QR}} \end{equation} \indent \ \ \ We have then \begin{equation} a=\pm\sqrt{P\pm\frac{iQR}{2\sqrt{P^2+QR}}} \end{equation} \indent \ \ \ From equation (\ref{twoa})'b^2R=Q(P-a^2)=\frac{\mp iQ^2R}{2\sqrt{P^2+QR}}\begin{equation} b=\pm\frac{(1\mp i)Q}{2\sqrt[4]{P^2+QR}} \end{equation} \indent \ \ \ where the\pmunder the square root in the expression foramates with\\ \indent \ \ \ the\mpin1\mp iin the expression forb.\\ \\ \indent \ \ \ From (\ref{twod}) we find that \begin{equation} c=\pm\frac{(1\mp i)R}{2\sqrt[4]{P^2+QR}} \end{equation} \indent \ \ \ Also, because of (\ref{twod}), the choice of\pmand\mpsigns in the expression\\ \indent \ \ \ forcmust be identical with the chosen signs inb.\\ \\ \indent \ \ \ From equation (\ref{twoc}) we find that \begin{equation} d=\pm\sqrt{-P\pm\frac{iQR}{2\sqrt{P^2+QR}}} \end{equation} \indent \ \ \ where the\pms under the square roots ofaanddare identical.\\ \indent \ \ \ We have then\ldots \begin{equation}\left(\begin{array}{cc} P&Q\\ R&-P\\ \end{array}\right)^{1/2}=\\ \left(\begin{array}{cc} \pm\sqrt{P\pm\frac{iQR}{2\sqrt{P^2+QR}}}&\pm\frac{(1\mp i)Q}{2\sqrt[4]{P^2+QR}}\\ \pm\frac{(1\mp i)R}{2\sqrt[4]{P^2+QR}}&\pm\sqrt{-P\pm\frac{ iQR}{2\sqrt{P^2+QR}}} \end{array}\right)\end{equation} \begin{tabbing} \indent \ \ \ \= To recap the choice of signs: All signs in the elements along the minor\\ \> diagonal are identical. The `inner' signs of all elements match (upper\\ \> or lower). The `outer' (leftmost, for each element) signs do not have\\ \> to match (except for the minor diagonal ones as already mentioned). \end{tabbing} \textbf{(V)}(P-S)^2+4QR=0\\ \\ \indent \ \ Equation (\ref{quadratic}) becomes \begin{equation} 2QR(P+S)\xi=-Q^2R^2 \end{equation} \indent \ \ SinceQR\ne 0andP+S\ne0, this becomes \begin{equation} a^2=P-\frac{QR}{2(P+S)} \end{equation} \indent \ \ From equation (\ref{twoa}) we have\\ \begin{equation} b^2=\frac{Q^2}{2(P+S)} \end{equation} \indent\ \ From (\ref{twod}) \begin{equation} c^2=\frac{R^2}{2(P+S)} \end{equation} \indent\ \ and from (\ref{twoc}) \begin{equation} d^2=S-\frac{QR}{2(P+S)} \end{equation} \indent \ \ The result is\ldots \begin{equation}\left(\begin{array}{cc} \pm\sqrt{P-\frac{QR}{2(P+S)}}&\pm\frac{Q}{\sqrt{2(P+S)}}\\ \pm\frac{R}{\sqrt{2(P+S)}}&\pm\sqrt{S-\frac{QR}{2(P+S)}}\\ \end{array}\right)\end{equation} \indent\ \ The signs along the minor diagonal are equal.\\ \\ \\ \textbf{(VI)} \ The general solution\\ \\ \indent\ \ \ \ We are now free to solve the most general case of equation (\ref{quadratic}): '[(P-S)^2+4QR]\xi^2+2QR(P+S)\xi+Q^2R^2=0' \indent\ \ \ \ We now find the discriminant which is of the \emph{form}B^2-4AC\ldots \begin{equation} 4Q^2R^2(P+S)^2-4Q^2R^2[(P-S)^2+4QR] \end{equation} '=4Q^2R^2[(P+S)^2-(P-S)^2-4QR]' '=4Q^2R^2[4PS-4QR]' '=16Q^2R^2(PS-QR)' \indent\ \ \ \ Therefore \begin{equation} \sqrt{B^2-4AC}=\pm4QR\sqrt{PS-QR} \end{equation} \indent\ \ \ \ We can now solve the quadratic equation (\ref{quadratic})\ldots\\ \\ \indent\ \ \ \ if \begin{equation} (P-S)^2+4QR\ne0 \end{equation} \indent\ \ \ \ Then \begin{equation} \mathcal{A}-P=\frac{-QR(P+S)\pm2QR\sqrt{PS-QR}}{(P-S)^2+4QR} \end{equation} \newline \indent\ \ \ \ giving us, finally, the expression fora\ldots \begin{equation} a^2=P-QR\bigg[\frac{P+S\pm2\sqrt{PS-QR}}{(P-S)^2+4QR}\bigg] \end{equation} \indent\ \ \ \ Notice thata'' may take on any one of four values.\\ \\ \indent\ \ \ \ From (\ref{twoa}) we find that \begin{equation} b^2=Q^2\bigg[\frac{P+S\pm2\sqrt{PS-QR}}{(P-S)^2+4QR}\bigg] \end{equation} \indent\ \ \ \ From (\ref{twob})\ldots \begin{equation} c^2=R^2\bigg[\frac{P+S\pm2\sqrt{PS-QR}}{(P-S)^2+4QR}\bigg] \end{equation} \indent\ \ \ \ Finally, from (\ref{twoc}) we have\\ \\ \begin{equation} d^2=S-QR\bigg[\frac{P+S\pm2\sqrt{PS-QR}}{(P-S)^2+4QR}\bigg] \end{equation}