Question: I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now.

```
\begin{align*}
&y&=2x+5\\   
-&&\\    
&y&=3x+10\\\hline   
&0&=-x-5    
\end{align*}

```

Answer: 
This does not look very good but seems close to what your code is attempting to do, where I use `\cline{}` to draw the horizontal line, and `\phantom{y=}` to push the minus sign to the left

![enter image description here](https://i.stack.imgur.com/BCBAd.png)

---

Recomended Solution:
--------------------

However, I would suggest the use of `\intertext` or `\shortintertext` from [the `mathtools` package](http://www.ctan.org/pkg/mathtools), and refer to the equations:

![enter image description here](https://i.stack.imgur.com/4ZVkt.png)

Notes:
------

* Requires two runs: first run will display a `(??)` in the cross reference.
* `\shortintertext` yields better spacing but requires an additional package. Alternatively, you can use `\intertext` which is available in `amsmath`.
* [The `mathtools` package](http://www.ctan.org/pkg/mathtools) already includes `amsmath`.

Code:
-----

```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
    y&=2x+5\\   
    -\phantom{y=}&\\    
    y&=3x+10\\
   \cline{1-2}
    0&=-x-5    
\end{align*}
\end{document}

```

---

```
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
    y&=2x+5 \label{eqn:one}\\
    y&=3x+10 \label{eqn:two}\\
  \shortintertext{Subtracting \eqref{eqn:two} from \eqref{eqn:one} yields}
    0&=-x-5  \notag
\end{align}
\end{document}

```
I write it like this:

```
\[\frac{\begin{matrix} y=2x+5\\ y=3x+10 \end{matrix}}{0=-x-5}\ -\]

```