Ekman developed the theory of the Ekman layer after Fridtjof Nansen observed that ice drifts at an angle of 20°-40° to the right of the prevailing wind direction while on an Arctic expedition aboard the Fram. Nansen asked his colleague, Vilhelm Bjerknes to set one of his students upon study of the problem. Bjerknes tapped Ekman, who presented his results in 1902 as his doctoral thesis.
The mathematical formulation of the Ekman layer can be found by assuming a neutrally stratified fluid, with horizontal momentum in balance between the forces of pressure gradient, Coriolis and turbulent drag.
where and are the velocities in the and directions, respectively, is the local Coriolis parameter, and is the diffusive eddy viscosity, which can be derived using mixing length theory. Note that is a modified pressure: we have incorporated the hydrostatic of the pressure, to take account of gravity.
There are many regions where an Ekman layer is theoretically plausible; they include the bottom of the atmosphere, near the surface of the earth and ocean, the bottom of the ocean, near the sea floor and at the top of the ocean, near the air-water interface. Different boundary conditions are appropriate for each of these different situations. We will consider boundary conditions of the Ekman layer in the upper ocean:
where and are the components of the surface stress, , of the wind field or ice layer at the top of the ocean and and are the geostrophic flows in the and directions – as
In the other situations, other boundary conditions, such as the no-slip condition, may be appropriate instead.
These differential equations can be solved to find:
This variation of horizontal velocity with depth () is referred to as the Ekman spiral, diagrammed above and at right.
By applying the continuity equation we can have the vertical velocity as following
Note that when vertically integrated the volume transport associated with the Ekman spiral is to the right of the wind direction in the Northern Hemisphere.
Experimental observations of the Ekman layer
There is much difficulty associated with observing the Ekman layer for two main reasons: the theory is too simplistic as it assumes a constant eddy viscosity, which Ekman himself anticipated, saying
|“||It is obvious that cannot generally be regarded as a constant when the density of water is not uniform within the region considered||”|
and because it is difficult to design instruments with great enough sensitivity to observe the velocity profile in the ocean.
The bottom Ekman layer can readily be observed in a rotating cylindrical tank of water by dropping in dye and changing the rotation rate slightly. Surface Ekman layers can also be observed in rotating tanks.
In the atmosphere
In the atmosphere, the Ekman solution generally overstates the magnitude of the horizontal wind field because it does not account for the velocity shear in the surface layer. Splitting the boundary layer into the surface layer and the Ekman layer generally yields more accurate results.
In the ocean
The Ekman layer, with its distinguishing feature the Ekman spiral, is rarely observed in the ocean. The Ekman layer near the surface of the ocean extends only about 10 – 20 meters deep, and instrumentation sensitive enough to observe a velocity profile in such a shallow depth has only been available since around 1980. Also, wind waves modify the flow near the surface, and make observations close to the surface rather difficult.
Observations of the Ekman layer have only been possible since the development of robust surface moorings and sensitive current meters. Ekman himself developed a current meter to observe the spiral that bears his name, but was not successful. The Vector Measuring Current Meter  and the Acoustic Doppler Current Profiler are both used to measure current.
The first documented observations of an Ekman-like spiral were made in the Arctic Ocean from a drifting ice flow in 1958. More recent observations include:
- The 1980 Mixed Layer Experiment
- Within the Sargasso Sea during the 1982 Long Term Upper Ocean Study 
- Within the California Current during the 1993 Eastern Boundary Current experiment 
- Within the Drake Passage region of the Southern Ocean 
- North of the Kerguelan Plateau during the 2008 SOFINE experiment 
Common to several of these observations spirals were found to be 'compressed', displaying larger estimates of eddy viscosity when considering the rate of rotation with depth than the eddy viscosity derived from considering the rate of decay of speed.
- Cushman-Roisin, Benoit (1994). "Chapter 5 - The Ekman Layer". Introduction to Geophysical Fluid Dynamics (1st ed.). Prentice Hall. pp. 76–77. ISBN 0-13-353301-8.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Vallis, Geoffrey K. (2006). "Chapter 2 – Effects of Rotation and Stratification". Atmospheric and Oceanic Fluid Dynamics (1st ed.). Cambridge, UK: Cambridge University Press. pp. 112–113. ISBN 0-521-84969-1.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Ekman, V.W. (1905). "On the influence of the earth's rotation on ocean currents". Ark. Mat. Astron. Fys. 2 (11): 1–52.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Holton, James R. (2004). "Chapter 5 – The Planetary Boundary Layer". Dynamic Meteorology. International Geophysics Series. 88 (4th ed.). Burlington, MA: Elsevier Academic Press. pp. 129–130. ISBN 0-12-354015-1.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Santala, M. J.; Terray, E. A. (1992). "A technique for making unbiased estimates of current shear from a wave-follower". Deep-Sea Res. 39 (3–4): 607–622. Bibcode:1992DSRI...39..607S. doi:10.1016/0198-0149(92)90091-7.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Rudnick, Daniel (2003). "Observations of Momentum Transfer in the Upper Ocean: Did Ekman Get It Right?". Near-Boundary Processes and their Parameterization. Manoa, Hawaii: School of Ocean and Earth Science and Technology.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Weller, R.A.; Davis, R.E. (1980). "A vector-measuring current meter". Deep-Sea Res. 27 (7): 565–582. Bibcode:1980DSRI...27..565W. doi:10.1016/0198-0149(80)90041-2.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Hunkins, K. (1966). "Ekman drift currents in the Arctic Ocean". Deep-Sea Res. 13: 607–620. Bibcode:1966DSROA..13..607H. doi:10.1016/0011-7471(66)90592-4.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Davis, R.E.; de Szoeke, R.; Niiler., P. (1981). "Part II: Modelling the mixed layer response". Deep-Sea Res. 28 (12): 1453–1475. Bibcode:1981DSRI...28.1453D. doi:10.1016/0198-0149(81)90092-3.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Price, J.F.; Weller, R.A.; Schudlich, R.R. (1987). "Wind-Driven Ocean Currents and Ekman Transport". Science. 238: 1534–1538. Bibcode:1987Sci...238.1534P. doi:10.1126/science.238.4833.1534.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Chereskin, T.K. (1995). "Direct evidence for an Ekman balance in the California Current". Journal of Geophysical Research. 100: 18261–18269. Bibcode:1995JGR...10018261C. doi:10.1029/95JC02182.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Lenn, Y; Chereskin, T.K. (2009). "Observation of Ekman Currents in the Southern Ocean". Journal Of Physical Oceanograph. 39: 768–779. Bibcode:2009JPO....39..768L. doi:10.1175/2008jpo3943.1.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
- Roach, C.J.; Phillips, H.E.; Bindoff, N.L.; Rintoul, S.R. (2015). "Detecting and Characterizing Ekman Currents in the Southern Ocean". Journal of Physical Oceanography. 45: 1205–1223. doi:10.1175/JPO-D-14-0115.1.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>