I have an equation set Ax=b and A(n*m),n<m . To lower down the dimension, I express some vars by other vars, which gives By=c. After some calculation, the values of y is achieved and I want to get x back. How can I accomplish this work?
The main aim is to get the substitution and back substitution, instead of solving the equations.
Remark: n and m are not fixed, the code need to be general for different scales.
For example:
x[1]+x[2]+x[3]==1&&x[2]+x[4]==1 Then we have:
x[1]==x[4]-x[3]&&x[2]==1-x[4] And after some calculation, I get {x[3],x[4]}=={0,1} and I want to get:
{x[1],x[2],x[3],x[4]}=={1,0,0,1} I know it's silly to use x[i], as I can't handle matrices well. I believe there is a way to finish all these in the language of matrices.
Solveseems to be what you're after. Or perhapsLinearSolve[A, b]plusNullSpace[A]$\endgroup$ReplaceAllwith a certain set of rules comes to mind ... $\endgroup$Solveshould have no problem to handle it. $\endgroup$