We prove that, under mild assumptions, for all positive integers ℓ, the zero set of the discriminant ideal D ℓ (R/Z(R), tr) of a prime affine polynomial identity (PI) algebra R coincides with the zero set of the modified discriminant ideal M D ℓ (R/Z(R), tr) of R, and give an explicit description of this set in terms of the dimensions of the irreducible representations of R. Furthermore, we prove that, when ℓ is the square of the PI-degree of R, this zero set is precisely the complement of the Azumaya locus of R. This description is used to classify the Azumaya loci of the mutiparameter quantized Weyl algebras at roots of unity. As another application, we prove that the zero set of the top discriminant ideal of a prime affine PI algebra R coincides with the singular locus of the center of R, provided that the discriminant ideal has height at least 2, R has finite global dimension and R is a Cohen-Macaulay module over its center.