Using our own computer program, we determined the spatial distribution of lattice strains in the HgCdTe heterostructure grown on a GaAs substrate. Lattice stress resulting from lattice mismatch between the substrate and the epitaxial layer and bending of the heterostructure is almost completely relaxed by misfit dislocations forming matrixes in the interfaces’ areas. The average distances between dislocation lines in individual interfaces were calculated based on the minimum energy, i.e. elastic energy condition resulting from the interaction of stress fields and deformations caused by lattice misfit, bending and the presence of dislocation plus electrical energy of dislocations.