# how to subtract two Equations and changes the symbol?

when we try to subtract algebraic equations we need to change the sign how to type this and produce the result in latex

You can set the entire structure inside an array:

\documentclass{article}

\begin{document}

$\setlength{\arraycolsep}{0pt}% Remove column separation \begin{array}{ c r c r c r } - & 15 x^2 y & {}+{} & 3x & {}-{} & 15 \\ + & 10 x^2 y & {}+{} & 10x & {}-{} & 7 \\ - & & {}-{} & & {}+{} & \\ \hline - & 25 x^2 y & {}-{} & 7x & {}-{} & 8 \end{array}$

\end{document}


The space around the operators are corrected (from unary to binary) using {}<op>{}.

Nice one!