Unfortunately, I could not find any option in MATLAB that allows us to see each computation step while using “simplify”.
However, according to the MATLAB R2024b “simplify” documentation, name-value pairs “All” set to true, and “Steps” set to any positive number can be used to obtain alternative expressions in the simplification process with a limitation being the expression to be scalar. So, we can use this workaround on each element of the matrix ‘X’ to find the steps involved in simplifying expression on the element.
Since ‘X’ is less complex, “simplify” solves in single step. To visualize the above workaround, I have provided a code involving matrix of more complex equations.
(x^2 - 2*x + 1) / (x - 1) + (x^3 - x^2) / (x^2 - x);
sin(x)^2 + cos(x)^2 + tan(x)^2 * (1 - sin(x)^2);
exp(x) * log(exp(x)) + log(x^2) - log(x) + log(x^3);
simplified_matrix = simplify(matrix)
simplified_matrix =

disp('Simplification steps for each element:');
Simplification steps for each element:
disp(['Element ', num2str(i), ':']);
steps = simplify(matrix(i), 'All', true, 'Steps', 4);
You can refer to “simplify” documentation for any queries.
https://www.mathworks.com/help/symbolic/sym.simplify.html#namevaluepairarguments
Hope this helps!