I'm trying to derive the law of reflection for Electromagnetic Waves and Optics. I'm using some lecture notes that my university provided. I'm confused as to why the two sine functions are changed to cosine functions as you don't do the same when you are deriving Snell's law. Refer to attached for the equations. I'm currently stuck at the part just before the sine's are converted into cosine functions.