It is known that the values of X and Y in the solution of the system of linear equations ax + y + 2 = 0x + ay − a + 3 = 0 are opposite to each other, then the value of a is______ .

It is known that the values of X and Y in the solution of the system of linear equations ax + y + 2 = 0x + ay − a + 3 = 0 are opposite to each other, then the value of a is______ .

Ax + y + 2 = 0, ① x + ay − a + 3 = 0, ② ∵ x, the values of Y are opposite to each other, ∵ x + y = 0, ① + ② can get (a + 1) x + (a + 1) y + 5-a = 0, that is, (a + 1) (x + y) + 5-a = 0, ③ substitute x + y = 0 into ③ to get 5-a = 0, the solution is a = 5