This lecture discusses the concept of internal gain in optical detection systems, particularly focusing on avalanche photodiodes. The instructor begins by introducing the parameters of the optical signal to be detected, including a power of 25 PW and a responsivity of 0.4 A/W. The lecture covers the calculation of the amplified photocurrent as a function of the gain, the shot noise associated with this current, and the total noise generated by the electronics. The instructor explains how to derive the signal-to-noise ratio based on these calculations and emphasizes the importance of determining the optimal gain for maximum signal detection. The discussion includes graphical representations of the signal, noise, and their ratios, illustrating how the signal-to-noise ratio varies with gain. The optimal gain is identified as approximately 75, highlighting the practical implications for using avalanche photodiodes in optical detection applications. Overall, the lecture provides a comprehensive overview of the interplay between signal amplification and noise in optical detection systems.