TITLE: Stable resolution of a $2\times2$ linear system
QUESTION [7 upvotes]: Cramer's method for the resolution of linear systems is known to be unstable, even in the $2\times2$ case. For general systems, stability can be improved by partial or full pivoting.
When you transpose the full pivoting principle to a $2\times2$, the procedure essentially amounts to

finding the LHS coefficient with the largest magnitude, let it be $a_{11}$ WLOG;
computing $x_2$ by determinants*,
computing $x_1$ by elimination of $x_2$ from equation $1$.

Can this improve stability ? Is there a more stable solution ?

*Whatever the choice of the pivot, the formula amounts to a ratio of $2\times2$ determinants. I wonder if first normalizing the pivot coefficient to $1$ makes any difference.
$$\frac{b_1-b_2\dfrac{a_{21}}{a_{11}}}{a_{22}-a_{12}\dfrac{a_{21}}{a_{11}}}\text{ vs. }\frac{b_1a_{11}-b_2a_{21}}{a_{11}a_{22}-a_{12}a_{21}}$$

REPLY [3 votes]: If your system has a fused multiply add instruction, then most determinants $$x = ab-bc$$ can be evaluated accurately using Kahan's method
$$\hat{w} = \text{fl}(bc), \quad e = \text{fl}(\hat{w} - bc), \quad \hat{f} = \text{fl}(ad-\hat{w}), \quad \hat{x} = \text{fl}(\hat{f}+e).$$
Here $\text{fl}(x)$ denotes the floating point representation of $x$. In the absence of underflow or overflow, we have the relative error bound $$|x - \hat{x}| \leq 2 u |x|.$$
Here $u$ is the unit roundoff. This is far better than we have any right to expect. Baring floating point exceptions you can solve a 2 by 2 linear system with a componentwise forward relative error which is at most $$\gamma_4 = \frac{4u}{1 - 4u}.$$
The proof of these and related statements are contained in the paper. 
Further analysis of Kahan's algorithm for the accurate computation of 2-by-2 determinants
If your system does not have fused multiply add instruction, then I would try to combine the regular TwoProduct and TwoSum algorithms, see the paper
Error-free transformations in real and complex floating point arithmetic 
for a description of the these and other algorithms based on error-free transformations of basic arithmetic operations.
In truth, I have not completed the analysis, but I would be very surprised if this idea did not work. If I stumble, then I would fall back on the paper 
Accurate sum and dot product
and treat the determinants as very short inner products.
Finally, the battle against overflow or underflow can be won by extracting and manipulating the exponents on your own.