c cosB + b cosC = a

c cosA + a cosC = b

b cosA + a cosB = c

write this in the form: Ax = b, where A, x, b are matrices

so we have:

|0......c......b| |cosA|.......|a|

|c......0......a| |cosB|...=...|b|

|b......a......0| |cosC|.......|c|

Now detA = 0 + abc + abc - 0 - 0 - 0 = 2abc

By Cramer's rule:

cosC = det |0......c......a| divided by detA = 2abc

................|c......0......b|

................|b......a......c|

=> cosC = (0 + cb^2 + ca^2 - 0 - 0 - c^3)/2abc

=> cosC = (cb^2 + ca^2 - c^3)/2abc

=> cosC = (b^2 + a^2 - c^2)/2ab ..............factored out and canceled the c's

=> 2abcosC = a^2 + b^2 - c^2

=> c^2 = a^2 + b^2 - 2abcosC which is the cosine rule