Cramer's rule
Cramer's rule is a tidy formula that solves a system of linear equations using only determinants — no row reduction, just plug and divide. For small systems it feels almost magical: each unknown is one fraction of two determinants.
Write the system as Ax = b, where A is the square coefficient matrix and b the column of constants. To find the value of the k-th unknown, replace the k-th column of A with the vector b, take the determinant of that altered matrix, and divide by det(A). Do this once for each unknown.
The method works only when det(A) is nonzero (so the system has exactly one solution); if det(A) is zero, Cramer's rule cannot be applied and the system is either inconsistent or has infinitely many solutions. It is elegant and great for 2-by-2 or 3-by-3 systems, but for large systems it is far slower than Gaussian elimination, so in practice it is mostly a theoretical and small-case tool.
For x + y = 3, x - y = 1: det(A) = det([1, 1; 1, -1]) = -2. x = det([3, 1; 1, -1]) / -2 = -4 / -2 = 2; y = det([1, 3; 1, 1]) / -2 = -2 / -2 = 1.
Swap in the constants column, then divide by det(A).