$\dim(W + U) = \dim(W) + \dim(U) - \dim(W \cap U)$ have a correlation with $|A\cup B|=|A|+|B|-|A\cap B|$ with the sets? In mathematics, the Grassmann formula is a relation concerning the dimension of the vector subspaces of a vector space or of the projective subspace of a projective space.
We know that the enunciation Grassmann's formula is:

Let $V$ a  vector space  on a  field $\Bbb K$ that have finite dimension. If  $W$ and $U$ be two subspaces of $V$ with $$W + U := \{\mathbf{w}+\mathbf{u}, \mathbf{w} \in W, \mathbf{u} \in U\}$$
then
$$\dim(W + U) = \dim(W) + \dim(U) - \dim(W \cap U) \tag 1$$

Obviously, if the sum is direct (I use the $\oplus$ symbol), then the intersection between the two subspaces consists only of the null vector ($W \cap U=\mathbf{0}$), hence
$$\dim(W \oplus U) = \dim(W) + \dim(U)$$
Now my question is indirectly for my 14-year old students but it is useful for me if there is a relationship with the Grassmann formula. If I have any two sets $A, B$, it is very easy to verify with the examples that:
$$\bbox[yellow,5px,border:2px solid red]{|A\cup B|=|A|+|B|-|A\cap B|} \tag 2$$
But the $(2)$ has a correlation with $(1)$ and how you can adapt it to get a suitable answer-explanation very simple with an example?
 A: I've taught college linear algebra to qualified high school students, but a 14-year old would typically be a high school freshman.  I'd therefore try to frame the notions in concrete vector space terms, e.g. working with vector space $V$ consisting of tuples $(x_1,x_2,\ldots,x_n)$ of real numbers.
It is a nice property of finite dimensional vector spaces that their subspaces are again finite dimensional.  While one might be happy to "verify with examples" your statement (2), even to take this approach to the dimension of a sum $W+U$ of subspaces of $V$ will require familiarity with how dimension of a vector (sub)space is defined:

The dimension of a vector space $V$ is $n$ iff $V$ has a basis set containing exactly $n$ vectors.

In other words one certainly needs to define a basis for a vector space, and to know pertinent facts about subspaces such as how a subspace is defined and:

*

*The intersection $W\cap U$ of two subspaces of $V$ is also a subspace of V.

*A basis for any subspace $W$ of finite dimensional $V$ can be extended to a basis for $V$.

*Every basis for subspace $W$ has the same size (so the dimension of $W$ is well-defined in not depending on the choice of a basis).

Let me dwell briefly on another crucial idea, the sum of two subspaces $W+U$.  There are two competing (but equivalent) ways to define this:
(a) The sum $W+U$ is the intersection of all subspaces of $V$ that contain both $W$ and $U$.
(b) The sum $W+U$ is the collection of all vectors in $V$ that can be expressed as $w+u$ for some $w\in W$ and $u\in U$.
In either case there is a bit work required to establish that $W+U$ is also a subspace of $V$.  It would then be possible to present the chain of ideas I laid out in my Comment.

*

*The intersection $W\cap U$ is a subspace and has a finite basis $\{v_1,\ldots,v_k\}$.  Thus $\dim(W\cap U) = k$, the size $k\ge 0$ of its basis.


*This basis of $W\cap U$ can be extended to a basis $$\{v_1,\ldots,v_k,w_1,\ldots,w_\ell\}$$ of subspace $W$, and similarly extended to a basis $$\{v_1,\ldots,v_k,u_1,\ldots,u_m\}$$ of subspace $U$.


*Finally, and the hardest part, one can show the union of those two basis sets $$\{v_1,\ldots,v_k,w_1,\ldots,w_\ell,u_1,\ldots,u_m\}$$ is a basis for $W+U$.  How one manages this depends on the pedagogical choice made to define $W+U$ discussed above.
In any case we can now compute the dimension of $W+U$ to be $k+\ell+m$, so that:
$$\dim (W+U) = (k+\ell) + (k+m) - k = \dim(W) + \dim(U) - \dim(W\cap U) $$
A: Let $W, U$ be the vector spaces formally spanned by $A, B$ respectively. Then $$\dim(W+U) = |A\cup B|, \dim(W) = |A|, \dim(U) = |B|, \dim(W\cap U) = A\cap B$$ therefore (2) formally follows from (1). But (1) is definitely a subtle and deeper result than (2).
