1

I want to customise my numbering for a single equation within a multi-line equation, whilst within the {equation} and {\align} environments. The following demonstrates what I'm trying to do, but does not compile:

\documentclass[fleqn, 12pt]{article} 
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{0pt}%
\begin{document}
\raggedright

\begin{equation}
\begin{aligned}
&\rightarrow \sum\limits_{i = 1}^n Y_i - \sum\limits_{i = 1}^n \beta_0 - \sum\limits_{i = 1}^n \beta_1 X_i = 0 \\
&\rightarrow \bar{Y} - \hat{\beta_0} - \hat{\beta_1}\hat{X_i} = 0 \\
&\rightarrow \hat{\beta_0} = \bar{Y} - \hat{\beta_1}\hat{X_i} \tag{3}\label{eq:3}
\end{aligned} 
\end{equation}

\end{document}

So the only equation that I want to be numbered is the line

&\rightarrow \hat{\beta_0} = \bar{Y} - \hat{\beta_1}\hat{X_i} \tag{3}\label{eq:3}

And I want it to be labelled (3).

I've tried the solutions in this question, but, unfortunately, I haven't been able to get them to work.

I would greatly appreciate it if people could demonstrate how I can do this.

1 Answers1

3

If you change the environment to align it is easier to remove the numbering from the other two equations.

\documentclass[fleqn, 12pt]{article} 
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{0pt}%
\begin{document}
\raggedright

% \begin{equation}
% \begin{aligned}
\begin{align}
&\rightarrow \sum\limits_{i = 1}^n Y_i - \sum\limits_{i = 1}^n \beta_0 - \sum\limits_{i = 1}^n \beta_1 X_i = 0 \nonumber\\
&\rightarrow \bar{Y} - \hat{\beta_0} - \hat{\beta_1}\hat{X_i} = 0 \nonumber\\
&\rightarrow \hat{\beta_0} = \bar{Y} - \hat{\beta_1}\hat{X_i} \tag{3}\label{eq:3}
\end{align} 
% \end{aligned} 
% \end{equation}

\end{document}

enter image description here

StefanH
  • 13,823