Nonlinear optics involves intense light interacting with matter to change the light's properties. This allows generating new frequencies of light from the input light. Second harmonic generation produces light with twice the frequency by combining two photons. High harmonic generation using intense lasers can generate coherent x-rays. Phase matching is important for high conversion efficiency in nonlinear optical processes. Applications include optical switching, data storage, and generating coherent x-rays for attosecond science.