Why it is unit elasticity If I always spend a total of exactly $\\\$10$ per week on coffee, then does my demand function have unit elasticity?
According to me, the change in income doesn't affect my coffee consumption, so it does not seem like unit elasticity. Can someone help me understand this?
Assuming you mean unit elasticity of demand with respect to price the answer is yes.
From the information you have, we can deduce that the demand function is as follows:
$$Q^d(p)=10/p$$ (I always spend $\\\$ 10$ on coffee, which buys me exactly $10/p$ units of coffee, where $p$ is the price of coffee).
Now recall the formula for computing elasticity of demand with respect to price:
$$\varepsilon \equiv \frac{dQ^d}{dp} \frac{p}{Q^d}$$
And the rest I leave to you.