I recently learnt about this mysterious "if and only if". That's all I know about it:
"$B\implies A$" is the symbolic notation for "If $B$, then $A$".
"$A$ only if $B$" means the same as "$A\implies B$".
So "$A$ if and only if $B$" means "($A$ if $B$) AND ($A$ only if $B$)", which can be expressed symbolically as $(B\implies A)\land(A\implies B)$.
Thus the "if and only if" can be written as a double arrow $\iff$.
I understand it sofar. But the thing I wondered about is why the symbol "$\iff$" is also used to mean equality of two statements. Why? Isn't equality of two statements (that is, equality of the truth values of those statements) the more fundamental notion? Is there something about the "if and only if" I don't know?
Consider two particular statements about a hypothetical natural number $n$:
$A$: "The number $n$ is a multiple of $2$ and of $15$"
$B$: "The number $n$ is a multiple of $6$ and of $5$"
These are equivalent statements, which means that for each natural number $k$, both $A(k)$ and $B(k)$ have the same truth value.
However, $A$ and $B$ on their own do not have truth values, because until we know a particular value of $n$ we do not know whether $A$ and $B$ are true or false. The fact that they are equivalent is thus a statement about the equality of an infinite set of truth values (one for each $k$), not a statement about "the truth value of $A$" and "the truth value of $B$"
Moreover, $A$ and $B$ are not equal statements. For example, the first statement contains a numeral $2$ and the second does not. The first requires 31 characters, not counting spaces, while the second only requires 30. Because the statements are not the same, we do not call them "equal".
For these reasons, we don't use an equality sign to denote equivalence of statements. First, the statements are rarely literally the same. Second, statements with undetermined variables ("free variables") do not have truth values at all until the variables are replaced with concrete values.