Solving Systems of Equations using Cramer's Rule
Mathematica 40

Setting up the problem in your reference link:  



s = {{2, 1, 1}, {1, -1, -1}, {1, 1, 1}};
r = {3, 0, 0};


The algorithm (spaces not needed):

i = 1; (a = s; a[[All, i++]] = r; Det@a/Det@s) &amp; /@ r


result:

{1, -2, 3}


If the system has infinite solutions it returns Indeterminate or ComplexInfinite

Please note that Mathematica can solve linear systems natively. Among other possible ways you could use:

s~LinearSolve~r


or

Solve[s.{x,y,z}==r]