any linear system of equations can be represented as:

Ax = b

where A is the coefficient matrix (in our case it's 2x2 matrix), x is a column vector of the unknown variables (in this case it's a 1x2) and b is a column vector of solutions (also 1x2).

now there are several ways of solving this system of equations, one of which is gaussian elimination, here are it's details:

Gaussian elimination - Wikipedia, the free encyclopedia

[1___a___ | 1___]

[0 -1-a^2 | -1-a ]

thus x2 = (-1-a) / (-1-a^2) = (1+a) / (1+a^2)

now after substituting the solution for x2 in the first equation we get:

x1 + a*(1+a) / (1+a^2) = 1

<=> x1` = (1-a) / (1+a^2)

another method that I'd recommand for solving this system of equations is matrix inversion:

Ax = b

thus: x = (A^-1)b

there is a simple method for inverting a 2x2 matrix (you should memorize it as it will prove to be very useful in the future)

1. switch the two elements on the main diagonal.

2. reverse the sign of the elements on the secondary diagonal.

3. divide all the elements by the matrix determinant

A^-1 =-1/(1+a^2) *[-1 -a]

__________________[-a 1 ]

---> x = -1/(1+a^2) *[-1 -a] * [1 ] = -1/(1+a^2) *[a-1 ] =[ (1-a)/(1+a^2) ]

___________________[-a 1 ]__[-1 ]_____________[-1-a]_ [ (1+a)/(1+a^2) ]

as you can see we've got the same answer