Finding a redundant equation in a system of linear simultaneous equations I was wondering if anyone would be able to provide help with a logical method of  finding a redundant equation in a system of linear simultaneous equations. By 'redundant', I mean that I want to be able to find an equation which could be removed without preventing solutions from being found to the system of equations.
For example, if the system states that '$a=1$ and $b=2$' then neither equation is redundant because information is lost by removing either equation. However, if the system states that '$a=b-1, a=1,$ and $b=2$' then any one (but not more than one) of these equations could be removed without any information being lost. Another example of a system with redundant equations would be if '$a=b, a=2, b=2, c=1,$ and $d=c$'. I could remove any one (but not more than one) of the first three without losing any information, but neither of the last two equations can be removed.
The reason that I want a way to find the redundant equations is because I am making a program that will convert chemical equations into a system of simultaneous equations, then will solve the simultaneous equations and use the solutions to balance the original chemical equation. The function that I have made that solves the simultaneous equations does not work if there are any redundant equations, which is why I need a logical method for how to find any redundant equations, as I will make the computer remove a redundant equation before solving. The user cannot just change the way that they type in the chemical equation, because that would defy the laws of chemistry.
Thank-you in advance.
 A: As those in the comments have said, the way to really solve such a problem is via Gaussian Elimination
In Python this is easily implemented either from first principles using lots of for loops and summations. 
But an even easier (and faster!) solution is to use the NumPy package routine "numpy.linalg.solve".
You are quite correct that the matrix must be square and of full rank in order for you to be able to solve it.
[Aside note: A square matrix is full rank if and only if it's determinant is nonzero.]
Using numpy.linalg.solve(A,B) is neat as it will raise an error "LinAlgError" if A is singular or not square. The example given at the bottom of the documentation page is entirely self explanatory, so I will not insult your intelligence by going over it again!
So you could do something like this, but you'd need your chemist to already have written the thing up as a matrix or you could be kinder to them and write a little code to create the matrices from the equations they enter as plain text (e.g. https://stackoverflow.com/questions/45220032/how-to-balance-a-chemical-equation-in-python-2-7-using-matrices/45220319)
A = input("Enter the coefficents of your matrix: ")
B = input("Enter the ordinate values: ")
x = np.linalg.solve(A, B)
print x

Hope this helps, have fun and good luck! :-)
