Hilbert space operators, relation between trace, rank and range If $A\colon H\to S$ is a bounded operator on a Hilbert space $H$, and $S\subset H$. It is known that $\operatorname{trace}(A)=\sum_{n} \langle Af_n,f_n\rangle$ for any orthonormal basis $\{f_{n}\}$. Is there a relation between $\operatorname{trace}(A)$, $\operatorname{rank}(A)$, and dimension of $\operatorname{range}(S)$?
Edit: What if $A$ is a composition of two orthogonal projections $A_{1}:H\to S_{1}$,$A_{2}:H\to S_{2}$, such that $A=A_{1}oA_{2}$, for $S_{1},S_{2}\subset H$. I need to show that $\operatorname{trace}(A)\leq \operatorname{rank}(A)\leq \dim(S_{2})$

Note that the trace is sensitive to scalar multiplication, while the range isn't (i.e. $A$ and $2A$ have the same range but different trace). So there cannot be relation in general. 
Now, if for example $A$ is a projection, then it is indeed true that the trace of $A$ agrees with the dimension of the range. 
