The given figure shows a ray of light as it travels from medium A to medium B. Refractive index of the medium B relative to medium A is:
Know your College Admission Chances Based on your Rank/Percentile, Category and Home State.
Get your JEE Main Personalised Report with Top Predicted Colleges in JoSA
The Snell's law simply relates angles i and r to the refraction indices of the two media A and B. Therefore, refractive index of medium B relative to