We study the transport properties of a 2D electron gas in narrow GaAs quantum wells with AlAs/GaAs superlattice barriers. It is shown that the anisotropic positive magnetoresistance observed in selectively doped semiconductor structures in a parallel magnetic field is caused by the spatial modulation of the 2D electron gas.In an idealized zero-thickness 2D electron system, the orbital motion of charge carriers is affected only by the normal component of the external magnetic field, where the magnitude of this component depends on the angle between the magnetic field B ext and the normal to the plane of 2D electron gas. The in-plane component of magnetic field in such a system will cause changes in the spin degree of freedom of charge carriers and, hence, in the density of states of 2D electron gas. The real 2D semiconductor systems always have a nonzero thickness, and this is the cause of the orbital effect in a parallel magnetic field [1]. Unlike the magnetoresistance associated with the spin effect [2], the one caused by the finite thickness of 2D electron gas is anisotropic. The origin of this anisotropy is that the variation of the effective mass of charge carriers in the direction perpendicular to the external magnetic field is greater than the variation in the direction parallel to the field.This anisotropy mechanism manifests itself in the dependence of the magnetoresistance of 2D electron gas on the mutual orientation of the in-plane magnetic field and the measuring current. In particular, in the situation where the measuring current is perpendicular to the in-plane magnetic field, the magnetoresistance of 2D electron gas in AlGaAs/GaAs heterojunctions is greater than in the situation where the current is parallel to the field [3]. The anisotropy of positive magnetoresistance observed in [3] was found to be much smaller than that predicted by the theory [1]. In our opinion, this discrepancy is due to the fact that 2D electron gas in real selectively doped structures not only has a finite thickness but is also nonplanar [4][5][6][7]. As will be shown below, even a very small spatial modulation of 2D electron gas, which is inherent in any real structure, also leads to the anisotropy of the positive magnetoresistance of 2D electron gas in an inplane magnetic field. However, the magnetoresistance in this mechanism is smaller when the magnetic field and the measuring current are mutually perpendicular and greater when they are parallel. A combined effect of the finite thickness and the spatial modulation of 2D electron gas should lead to a decrease in the degree of magnetoresistance anisotropy in the in-plane magnetic field, which may qualitatively explain the experimental results obtained in [3].In the general case, the surface of 2D electron gas can be described by the function z=z(x, y) characterizing the deviation of the surface from the ideal plane formed by the x and y axes. If we decompose the vector of external magnetic field into perpendicular and parallel components, B ext =B ⊥ (x, y) + B ║ (x, y), ...