I'm writing a mathematical article and I want the equation numbers to appear on the right hand side and the end of the line however they are currently appearing underneath the equation on the left. How can I change this?
EXAMPLE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\usepackage[section]{placeins}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{geometry}
\geometry{ a4paper, total={170mm,257mm}, left=20mm, top=20mm, }
\begin{document}
\maketitle
\section{Equations}
The horizontal and vertical links and network nodes can now be defined as the following matrices: \
\textbf{Horizonal Links} \newline
For 1 \leq i \leq m+1 \ $and$ \ 1 \leq j \leq n
\begin{description}
\item[(a)]
\begin{equation} A_{ij}^X= \begin{cases} 1, & \text{if the link between ($i,j$) and ($i,j+1$) exists}\ \ 0, & \text{otherwise}\ \ \end{cases}
\end{equation} $$
\item[(b)]
\begin{equation} X_{ij} = l_{ij}
\end{equation}
where $l_{ij}$ is the length of the link between ($i,j$) and ($i,j+1$). If >there is no link between ($i,j$) and ($i,j+1$) then $l_{ij}$=0
\end{description}
\bibliographystyle{plain}
\bibliography{references}
\end{document}
leqno
or some different setup apparently?