Structure of the solution space of certain linear equations