def matrix_augment(A,b):
    """ return an augmented matrix
        for a linear system Ax=b
        where A is an NxN matrix and x,b are
        both column vectors of length N
        an augmented matrix is an Nx(N+1) matrix
        where each value in b is appended to the
        end of the corresponding row in A.

        for simplicity, b is a row-vector
        instead of a column vector.
    """
    B = [ row + [v,] for row,v in zip(A,b) ]
    return B;