Solving Ag=b with non symmetric A Following is a question that did not receive attention at math.SE at all. I am aware that is would be better suited there, but given its Economic background, perhaps it will get more attention here. If not, I'm happy to call this a failed attempt and delete it.

I need to solve $Ag=b$ for $b$, where $A$ is not symmetric.

$$A g = b \\
A = \left(\begin{matrix} A_1 \\ E_{IJ} \otimes \mathbb 1  \end{matrix}\right)$$

For some positive integers $I, J$: $A$ has size $(IJ\cdot J)\times IJ$, $g$ has size $IJ \times 1$, and $b$ has size $IJ \times 1$. $A$ is vertically stacked $A_1, A_2$, where $A_1$ is $IJ\times IJ$.  $\mathbb 1$ is $J\times 1$ vector of ones, and $E$ is the identity matrix. 

I need to solve this for $g$ on a computer for the case where $J$ small and $I$ large. I am fairly certain (through the way I get $A_1$ and $A_2$) that with $A_1$ being singular, my system of equations is exactly identifying $g$.

I'm used to the case where $A$ is symmetric and invertible. How do I proceed here?
Maybe this helps. One method to do this is to use least squares (as was mentioned by @cc7768).
Matlab does this by default when using the \ operator.
This is also useful because it's sensible even if the system is overidentified as in the following example:

A = [1 22; 2 100; 7 6]
b = [1 2 5]'
A\b


produces

ans =

    0.7108
    0.0061


. In Python, this can be done with

import numpy
from numpy import linalg
A = numpy.matrix("1 22; 2 100; 7 6")
b = numpy.matrix("1 2 5").T
linalg.lstsq(A,b)[0]


which gives

matrix([[ 0.71084144],
        [ 0.00611577]])


.