The Maxwell Garnett and Bruggeman effective medium theories for the optical properties of inhomogeneous materials are derived from a unified theoretical framework, and the limits within which these theories are applicable are determined. Random unit cells are defined for separated-grain and aggregate microstructures of heterogeneous two-phase media which correspond to the Maxwell Garnett and Bruggeman theories, respectively, and an effective medium is defined by the requirement that the random unit cell be invisible when embedded in it. The effective medium theories are then obtained by setting the dominant term in the Mie-type expansion of the scattering amplitude function in the direction of the impinging beam equal to zero. Upper limits to particle size for the applicability of the theories are derived from considerations of the importance of the higher-order terms in the scattering expansions, and it is pointed out that the lower limit is set by the size at which the components of the heterogeneous material can no longer be described by macroscopic dielectric properties. The limits of validity of the theories are then illustrated for the case of Co-Al2O3 cermets.