9. Color each vertex of a convex $n(n \geqslant 4)$-gon either black or white. If the two endpoints of a diagonal are of different colors, then the diagonal is called "bichromatic". If a coloring of the vertices allows the convex $n$-gon to be triangulated using bichromatic diagonals, then the coloring is called "good". Determine the number of good colorings.
9. $n^{2}-n$.

Obviously, the coloring method where all vertices are colored the same color is not "good," and we will not consider such a coloring method below.

If the two endpoints of a side of a polygon are one white and one black, then the side is called "bichromatic." If a coloring method of the vertices makes all the black vertices on the boundary of the polygon connected (in other words, there are only two bichromatic sides in the polygon), then the method is called "ordered."

Lemma: For an $n(n \geqslant 3)$-sided polygon, a coloring method of the vertices is good if and only if it is ordered.
Proof: Induction on $n$.
When $n=3$, no proof is needed (since we do not consider the case where all vertices are colored the same color).

Assume the conclusion holds for all integers $m$ satisfying $3 \leqslant m < n$ $(n \geqslant 4)$, and we need to prove that the conclusion also holds for $n$.
Assume the given coloring method is good.
We can use non-intersecting bichromatic diagonals to divide the polygon into a series of triangles. Consider one of these diagonals $A B$, which divides the polygon into two smaller polygons $P_{1}$ and $P_{2}$, where the vertices of each polygon are colored in a good way. According to the induction hypothesis, the coloring methods for these polygons are ordered.

Assume $A$ is black and $B$ is white. Then, in $P_{1}$, the black vertices are a sequence of connected vertices starting from point $A$ (excluding vertex $B$), and the same applies to $P_{2}$. The union of these two segments of connected black vertices forms a segment of connected black vertices in the original polygon, indicating that the coloring method for the $n$-sided polygon is also ordered.
Now assume the coloring method is ordered.
It is not difficult to see that there are bichromatic diagonals in the polygon, which divide the polygon into two smaller polygons, and the coloring of the vertices of these polygons is also ordered. According to the induction hypothesis, the coloring methods for these polygons are good, indicating that the coloring method for the original $n$-sided polygon is also good.
The lemma is proved.
Based on the lemma, we only need to calculate the number of different ordered coloring methods for the vertices of an $n$-sided polygon.

The number of black vertices can be $1, 2, \cdots, n-1$. For each length of the "black segment," there are $n$ ways to choose the starting point, so there are a total of $n(n-1)$ ordered coloring methods, which are also good coloring methods.