I have a symmetric $100\times100$ matrix, $A$ , with elements $A_{ij} < 100 $. I have to find whether this matrix is equal to or similar to another matrix $B$ of the same configuration. As these matrices are happening at a different point in time, I can't have an element by element comparison. I am looking to create something like base or invariant from the first matrix, store it, find the same base or invariant from the second matrix, and then compare whether they are equal or not.
I want to know if there is any way to do that in a computationally feasible way. As per Spectral theorem, is there a way to find invariant factors with less computation?
As you have symmetric matrices with real entries, their eigenvalues are real numbers.
This does not mean you have to compute the eigenvalues. Your objective to use invariants such as trace, determinant, etc. is very reasonable.
I would even advise you to restrict your investigations at first to the trace $\sum_i A_{ii}$ ; it is very light, computionaly speaking (unlike the determinant) and work in this way:
Compute and store the trace of each matrix.
Once this has been done, look for pairs $(A,A')$ of matrices with the same trace (or maybe whose trace differ by less than a very small amount...),
compare now those matrix pairs :
a) entrywise for the case $A=A'$.
b) If $A \neq A'$, they can be similar ; I would advise then to provide a second filter by testing if $\det(A)=\det(A')$. If it is not the case, you can reject the pair, otherwise, now and only now, you can proceed to the computation of both spectra and test whether they are the same.