This has been discussed extensively in this forum.
See, for example
basically anything about the Rayleigh Criterion.