Two-component conductors -e.g., semi-metals and narrow band semiconductors -often exhibit unusually strong magnetoresistance in a wide temperature range. Suppression of the Hall voltage near charge neutrality in such systems gives rise to a strong quasiparticle drift in the direction perpendicular to the electric current and magnetic field. This drift is responsible for a strong geometrical increase of resistance even in weak magnetic fields. Combining the Boltzmann kinetic equation with sample electrostatics, we develop a microscopic theory of magnetotransport in two and three spatial dimensions. The compensated Hall effect in confined geometry is always accompanied by electronhole recombination near the sample edges and at large-scale inhomogeneities. As the result, classical edge currents may dominate the resistance in the vicinity of charge compensation. The effect leads to linear magnetoresistance in two dimensions in a broad range of parameters. In three dimensions, the magnetoresistance is normally quadratic in the field, with the linear regime restricted to rectangular samples with magnetic field directed perpendicular to the sample surface. Finally, we discuss the effects of heat flow and temperature inhomogeneities on the magnetoresistance.The theory of magnetotransport in solids 1,2 is a mature branch of condensed matter physics. Measurements of magnetoresistance and classical Hall effect are long recognized as valuable experimental tools to characterize conducting samples. Interpreting the experiments within the standard Drude theory 1,3,4 , one may extract many useful sample characteristics such as the electron mobility and charge density at the Fermi level. However, in materials with more than one type of charge carriers -e.g., semimetals and narrow band semiconductors -the situation is more complex. Indeed, already in 1928 Kapitsa observed unconventional magnetoresistance in semi-metal bismuth films 5 . More recently, interest in magnetotransport has been revived with the discovery of novel twocomponent systems including graphene 6-11 , topological insulators 12-16 , and Weyl semimetals [17][18][19][20][21][22][23][24][25][26][27] . A common feature of all such systems is the existence of the charge neutrality (or, charge compensation) point, where the concentrations of the positively and negatively charged quasiparticles (electron-like and hole-like, respectively) are equal and the system is electrically neutral.A fast growing number of experiments on novel twocomponent materials exhibit unconventional transport properties in magnetic field: (i) linear magnetoresistance (LMR) was reported in graphene and topological insulators close to charge neutrality [85][86][87] . In weak fields, resistivity of two-dimensional (2D) electron systems acquires an interaction correction 88 that is linear in the field.The extreme quantum limit of Refs. 85-87 has been realized in graphene 28 , Bi 2 Te 3 nanosheets 56 , and possibly in the novel topological material LuPdBi 57 . However, this mechanism is applicable...