1

when we try to subtract algebraic equations we need to change the sign how to type this and produce the result in latexenter image description here

2

You can set the entire structure inside an array:

enter image description here

\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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.