I have an underdetermined system of linear equations. This can for example be solved by SimPy, where the solution is then a function of some free variables. What I am looking for is, which are those free variables. This set of variables is not unique but one option is enough. For example
[1 0 1] [x1] = [1]
[0 1 0] [x2] = [1]
[x3]
Here, x2 is determined by the second equation, and either x1or x3 could be used as a free variable. So for example the set {x1} is a valid solution to my problem
One way of finding this is using SymPy and parsing the solutions to find which variables are used in there. This is rather cumbersome. Is there a nicer way to do this? Preferably without any symbolic computations (returning the index of the free variables).
Here the same question is asked, but not answered, as it turned out the asker wanted to ask something else: How to determine which one is free variable in the result of sympy.linsolve
He just wanted a single solution to the system. I want to know the free variables, and don't even need to know a solution.