The core of the symbolic math toolbar is mupad, software developed by the mupad research group at paderborn university. If you want a general idea of how symbolic math works in Matlab, try finding it there.
The sym object itself is a kind of wrapper that transfers data to matlab. You can easily prove that sym does not contain all the necessary information. Create a constant of 1000 to store this information, it takes more than 112 bytes, but your sym is still the same size.
source share