Applications of X-ray fluorescence (XRF) analysis to solid and liquid samples with a pyroelectric X-ray generator are described. The X-ray generator is driven by a 9 V dry electric battery and small dimensions. It enables compact and portable XRF spectrometer. It has disadvantages in low power and periodically changing X-ray flux. Measured solid samples are briquettes from powdery oxides of Ti , V , Cr , Mn , Fe , Co , Ni and Cu , and sulfide of Zn . Each sample is prepared to contain equal molar metal elements. Liquid samples are solutions of Fe , Cr , Zn , Pb , Bi , Cd . K α and K β lines of all metals in solid samples are detected. Although background level was relatively high for liquids, all metals in the measured samples were detected within 70 seconds, except for Cd . The capability of XRF with the pyroelectric X-ray generator is discussed.