\[ S_1 = \{A = [a_{ij}] \in M : A = A^T \text{ and } a_{ij} \in S, \forall i, j\}, \]
\[ S_2 = \{A = [a_{ij}] \in M : A = -A^T \text{ and } a_{ij} \in S, \forall i, j\}, \]
\[ S_3 = \{A = [a_{ij}] \in M : a_{11} + a_{22} + a_{33} = 0 \text{ and } a_{ij} \in S, \forall i, j\}. \]
\( S_1 \) comprises symmetric matrices. Elements above the main diagonal dictate the matrix. With 5 options for each of the 6 such positions:
\[ |S_1| = 5^6 \]
\( S_2 \) comprises skew-symmetric matrices. Non-diagonal elements are independent, but diagonal elements must be 0. Since 0 is not in \( S \), \( S_2 \) is invalid.
\[ |S_2| = 0 \]
\( S_3 \) requires the trace to be zero. Two elements can be chosen freely, determining the third:
\[ |S_3| = 5^2 \times (\text{number of valid third elements}) \]
Applying the inclusion-exclusion principle to find \(n(S_1 \cup S_2 \cup S_3)\):
\[ n(S_1 \cup S_2 \cup S_3) = |S_1| + |S_2| + |S_3| - (\text{intersections}) = 125 \]