Following Arnold's reply, there is something you can do to simplify the problem. Specifically, rewrite the system as Ay+Gx=0,GTy=−b. Then note that from the statement that G is tall and narrow and each row has only one 1 and zeros otherwise, then the statement GTy=−b means that a subset of the elements of y have a fixed value, namely the elements of −b.
Let us say that for simplicity that G has m columns and n rows and that exactly the first m rows have ones in them and that be reordering the elements of x I can make it so that G has the m×m identity matrix at the top and a n−m×m zero matrix at the bottom. Then
I can partition y=(yc,yf) into m "constrained" and n−m "free" elements so that yc=−b. I can also partition A so that A=(AccAfcAcfAff). From the equation Ay+Gx=0 I then get the following:
Accyc+Acfyf+x=0,Afcyc+Affyf=0
and using what we know about
yc we have from the second of these equations
Affyf=Afcb
and consequently
x=Accb−AcfA−1ffAfcb.
In other words, the only matrix you have to invert is the subset of
A whose rows and columns are not mentioned in
G (the null space of
G). This you can easily do: (i) compute
z=Afcb; (ii) use whatever solver you have to solve
Affh=z; (iii) compute
x=Accb−Acfh.
In other words, given the structure of G, solving the linear system you have is really not more difficult than solving a single linear system with A.