Here is an interesting linear algebra problem:
Let $F$ be any field and $S$ be a symmetric, invertible matrix with entries from $F.$ Then what is the dimension of the vector space: $$V = \{A\in M_n(F)|\, A^t = SAS^{-1}\}\quad$$ ?
I believe have solved this problem with the answer being $\dim V = \dfrac{n(n+1)}{2},$ but my solution is a bit cumbersome to write: I considered a $n^2\times n^2$ matrix whose kernel is isomorphic to $V$ and then computed the kernel manually.
I was wondering if there is some slick solution to this (I am almost positive that there is one.) What's troubling is that $F$ is an arbitrary field, considering Jordan normal form let alone diagonalization becomes a bit problematic.
Consider a linear transform $T: A \mapsto SA-A^t S$.
Then the rank of $T$ is at most $(n^2-n)/2$ since $SA-A^t S$ is always skew-symmetric. Here, we need to define 'skew-symmetric' as being an image of $T_0: A\mapsto A-A^t$.
To see if the rank of $T$ is exactly $(n^2-n)/2$, let $B$ be any skew-symmetric matrix with $B=A-A^t$ for some $A$. Since $S$ is invertible, we can find a matrix $C$ such that $A=SC$. Then we have $$ B=SC-C^tS. $$ Then we have $T(C) = B$. This proves the claim that the rank of $T$ is $(n^2-n)/2$.
Now, by rank-nullity theorem, we must have $$ \mathrm{dim} \mathrm{ker}(T) + (n^2-n)/2 = n^2. $$ Hence, we have $$ \mathrm{dim} \mathrm{ker}(T)= (n^2+n)/2. $$
Note: After realizing that previous argument fails when the characteristic of the field is $2$, the modification of the argument in this edit works generally for any characteristic.
Alternative simpler method
It is possible to simplify my argument. Let $V_0$ be the space of symmetric matrices $$ V_0=\{B\in M_n(F) | B^t= B\}. $$ Then it is easy to see that the dimension of $V_0$ is $(n^2+n)/2$.
We establish an isomorphism (due to $S$ being invertible symmetric) between $V_0$ and $V$ by $$ f: V_0 \rightarrow V $$ $$ B \mapsto S^{-1}B.$$ Theorefore, $V$ has dimension $(n^2+n)/2$.