Definition: Subvarieties $ Y_{1},\dots,Y_{r} $ of a nonsingular variety $ X $ are transversal at a point $ x = \bigcap Y_{i} $ if $$ \text{codim}_{\Theta_{X,x}}\Bigg(\bigcap_{i=1}^{r} \Theta_{Y_{i},x} \Bigg) = \sum_{i=1}^{r} \text{codim}_{X}Y_{i}. $$
The author proceeds to say:
Two curves on a nonsingular surface are transversal at a point of intersection if they are both nonsingular and their tangent lines are different.
How can I deduce this from the definition?
In a previous section, the author states that:
$$ \text{codim}_{X}\Bigg(\bigcap_{i=1}^{r} Y_{i} \Bigg) \leq \sum_{i=1}^{r} \text{codim}_{X}Y_{i}. $$
If we apply this inequality to the subspaces $ \Theta_{Y_{i},x} \subset \Theta_{X,x}, $ we have $$ \text{codim}_{\Theta_{X,x}}\Bigg(\bigcap_{i=1}^{r} \Theta_{Y_{i},x} \Bigg) \leq \sum_{i=1}^{r} \text{codim}_{\Theta_{X,x}}\Theta_{Y_{i},x}. $$
Furthermore, if we recall the fact that $ \text{codim}\Theta_{Y_{i},x} \leq \text{codim}_{X}Y_{i}, $ the very first equation (in the definition) implies that $$ \text{dim}\Theta_{Y_{i},x} = \text{dim}Y_{i}. $$
I am struggling to make this last deduction. Why do these facts imply that $ \text{dim}\Theta_{Y_{i},x} = \text{dim}Y_{i}$ ?