Here is a labeled equation:
with a reference to ref1: , and another numbered one with no label:
This one uses \nonumber:
Here’s one using the equation environment:
and one with equation* environment:
This is a forward reference and another for the following equation:
More math:
Here is a ref inside math: and text after it.
Here’s a bad ref to a nonexistent label.
An alignment:
and a starred one: