# Algorithm to convert from ECEF coordinates to ECI coordinates

I am looking for an Algorithm (the formulas; not the code) to convert from ECEF coordinates to ECI coordinates.

I have a MATLAB code for it but am unable to understand certain things. So it'd be helpful if I could get the Algorithm in mathematical form (preferably along with the derivation).

There isn't a single ECI frame; there are many to choose from (see e.g. https://en.wikipedia.org/wiki/Earth-centered_inertial). This choice will effect the conversion.

Once you've chosen a suitable frame, you essentially just need to know the time corresponding to the ECEF coordinates and how quickly the Earth is spinning.