In Quantum Computation and Quantum Information by Nielsen and Chuang, the authors introduce operator sum representation in Section 8.2.3. They denote the evolution of a density matrix, when given an environment, is the following:
$$\varepsilon (\rho) = \mathrm{tr}_{\text{env}} [U(\rho\otimes \rho_{\text{env}})U^\dagger]$$
Where you are essentially taking the trace to discard the environment of the unitary evolution of the entire system. What I don't understand is how the operator sum representation is equivalent (Equations 8.9 and 8.11 in N&C)
$$\varepsilon (\rho) = \sum_k \langle \mathbf{e}_k|U[\rho \otimes |\mathbf{e}_0\rangle \langle \mathbf{e}_0|]U^\dagger|\mathbf{e}_k\rangle = \sum_k E_k\rho E_k^\dagger$$
In this equation, I take $|\mathbf{e}_k\rangle$ to represent the basis of the system and U to be a 4 x 4 unitary matrix governing the evolution. How is this equivalent to the first equation where you discard the trace? It seems like the second equation (equation 8.9 in N&C) above would yield a scalar quantity. What does this equation mean? I understand the first equation where you take the partial trace, but how does partial trace relate to the 2nd and 3rd equations? I'm a relative beginner in this field.