I haven't yet gotten a good answer to this: If you have two rays of light of the same wavelength and polarization (just to make it simple for now, but it easily generalizes to any range and all polarizations) meet at a point such that they're 180 degrees out of phase (due to path length difference, or whatever), we all know they interfere destructively, and a detector at exactly that point wouldn't read anything.

So my question is, since such an insanely huge number of photons are coming out of the sun constantly, why isn't any photon hitting a detector matched up with another photon that happens to be exactly out of phase with it? If you have an enormous number of randomly produced photons traveling random distances (with respect to their wavelength, anyway), that seems like it would happen, similar to the way that the sum of a huge number of randomly selected 1's and -1's would never stray far from 0. Mathematically, it would be:

$$\int_0 ^{2\pi} e^{i \phi} d\phi = 0$$

Of course, the same would happen for a given polarization, and any given wavelength.

I'm pretty sure I see the sun though, so I suspect something with my assumption that there are effectively an infinite number of photons hitting a given spot is flawed... are they locally in phase or something?

First let's deal with a false assumption:


  similar to the way that the sum of a huge number of randomly selected 1's and -1's would never stray far from 0.


Suppose we have a set of $N$ random variables $X_i$, each independent and with equal probability of being either $+1$ or $-1$. Define
$$ S = \sum_{i=1}^N X_i. $$
Then, yes, the expectation of $S$ may be $0$,
$$ \langle S \rangle = \sum_{i=1}^N \langle X_i \rangle = \sum_{i=1}^N \left(\frac{1}{2}(+1) + \frac{1}{2}(-1)\right) = 0, $$
but the fluctuations can be significant. Since we can write
$$ S^2 = \sum_{i=1}^N X_i^2 + 2 \sum_{i=1}^N \sum_{j=i+1}^N X_i X_j, $$
then more manipulation of expectation values (remember, they always distribute over sums; also the expectation of a product is the product of the expectations if and only if the factors are independent, which is the case for us for $i \neq j$) yields
$$ \langle S^2 \rangle = \sum_{i=1}^N \langle X_i^2 \rangle + 2 \sum_{i=1}^N \sum_{j=i+1}^N \langle X_i X_j \rangle = \sum_{i=1}^N \left(\frac{1}{2}(+1)^2 + \frac{1}{2}(-1)^2\right) + 2 \sum_{i=1}^N \sum_{j=i+1}^N (0) (0) = N. $$
The standard deviation will be
$$ \sigma_S = \left(\langle S^2 \rangle - \langle S \rangle^2\right)^{1/2} = \sqrt{N}. $$
This can be arbitrarily large. Another way of looking at this is that the more coins you flip, the less likely you are to be within a fixed range of breaking even.



Now let's apply this to the slightly more advanced case of independent phases of photons. Suppose we have $N$ independent photons with phases $\phi_i$ uniformly distributed on $(0, 2\pi)$. For simplicity I will assume all the photons have the same amplitude, set to unity. Then the electric field will have strength
$$ E = \sum_{i=1}^N \mathrm{e}^{\mathrm{i}\phi_i}. $$
Sure enough, the average electric field will be $0$:
$$ \langle E \rangle = \sum_{i=1}^N \langle \mathrm{e}^{\mathrm{i}\phi_i} \rangle = \sum_{i=1}^N \frac{1}{2\pi} \int_0^{2\pi} \mathrm{e}^{\mathrm{i}\phi}\ \mathrm{d}\phi = \sum_{i=1}^N 0 = 0. $$
However, you see images not in electric field strength but in intensity, which is the square-magnitude of this:
$$ I = \lvert E \rvert^2 = \sum_{i=1}^N \mathrm{e}^{\mathrm{i}\phi_i} \mathrm{e}^{-\mathrm{i}\phi_i} + \sum_{i=1}^N \sum_{j=i+1}^N \left(\mathrm{e}^{\mathrm{i}\phi_i} \mathrm{e}^{-\mathrm{i}\phi_j} + \mathrm{e}^{-\mathrm{i}\phi_i} \mathrm{e}^{\mathrm{i}\phi_j}\right) = N + 2 \sum_{i=1}^N \sum_{j=i+1}^N \cos(\phi_i-\phi_j). $$
Paralleling the computation above, we have
$$ \langle I \rangle = \langle N \rangle + 2 \sum_{i=1}^N \sum_{j=i+1}^N \frac{1}{(2\pi)^2} \int_0^{2\pi}\!\!\int_0^{2\pi} \cos(\phi-\phi')\ \mathrm{d}\phi\ \mathrm{d}\phi' = N + 0 = N. $$
The more photons there are, the greater the intensity, even though there will be more cancellations.



So what does this mean physically? The Sun is an incoherent source, meaning the photons coming from its surface really are independent in phase, so the above calculations are appropriate. This is in contrast to a laser, where the phases have a very tight relation to one another (they are all the same).

Your eye (or rather each receptor in your eye) has an extended volume over which it is sensitive to light, and it integrates whatever fluctuations occur over an extended time (which you know to be longer than, say, $1/60$ of a second, given that most people don't notice faster refresh rates on monitors). In this volume over this time, there will be some average number of photons. Even if the volume is small enough such that all opposite-phase photons will cancel (obviously two spatially separated photons won't cancel no matter their phases), the intensity of the photon field is expected to be nonzero.

In fact, we can put some numbers to this. Take a typical cone in your eye to have a diameter of $2\ \mathrm{µm}$, as per Wikipedia. About $10\%$ of the Sun's $1400\ \mathrm{W/m^2}$ flux is in the $500\text{–}600\ \mathrm{nm}$ range, where the typical photon energy is $3.6\times10^{-19}\ \mathrm{J}$. Neglecting the effects of focusing among other things, the number of photons in play in a single receptor is something like
$$ N \approx \frac{\pi (1\ \mathrm{µm})^2 (140\ \mathrm{W/m^2}) (0.02\ \mathrm{s})}{3.6\times10^{-19}\ \mathrm{J}} \approx 2\times10^7. $$ The fractional change in intensity from "frame to frame" or "pixel to pixel" in your vision would be something like $1/\sqrt{N} \approx 0.02\%$. Even give or take a few orders of magnitude, you can see that the Sun should shine steadily and uniformly.
