We all know that poynting vector points in the direction of the wave propagation and it's value of power supplied to a unit area.
So while deriving poynting theorm, the energy flown out of the system can be written as
$$\int S \cdot da$$ Where da is an infinitesimally small area element.
But I don't understand why do we use $S$ and $da$ as vector i.e. why do we write energy flown out of the system as
$$\int \vec S \cdot d\vec a$$