See this Wikipedia article, especially Method 2. It uses matrix algebra to solve a system of linear equations, but this system can be solved using any method, such as the elimination of variables, which I believe is taught in school. You could put d = -1 (or any other non-zero number).