The magnetic and electronic properties of Fe chains on InAs(1 1 0) are calculated from first-principles using the density functional theory. The magnetic ground state is found to be antiferromagnetic (AF) for Fe chains along [1 -1 0] direction and ferromagnetic (FM) for Fe chains along the perpendicular [0 0 1] direction. The AF structure is explained with an AF superexchange between Fe atoms via mediating As, while the FM structure is explained with a more complicated exchange path via surface As and In atoms.