# How to write a basic equation in latex (see picture)

How to write these equations in latex?

edit: I want both equations to be in line. So that the equation is in the second equation below.

• Welcome to TeX.SX! 1. Please read first a latex tuorial.... 2. Show us your code. - You could start with $(T_5g)(t) = g(t-5)$Its very easy. – Bobyandbob Jul 17 '18 at 14:38
• What have you tried to make these equations? Could you provide us with the part that you are stuck on? If you don't show any amount of effort trying to solve the problem yourself first, then you probably won't find your questions answered. – Flexo013 Jul 17 '18 at 14:38

I’m sorry, but Sebastiano’s is an awful way of using the align* environment. Let's recap a few basic facts:

The source code is:

% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

\usepackage{amsmath}

\begin{document}

There are several ways to achive such a layout:

\begin{enumerate}
\item
Use a plain \texttt{align*} environment:
\begin{align*}
(T_{5}g)(t) &= g(t-5) &
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t}
\end{align*}

You could also have an equation number on, say, the first line,
but I~don't think this is what you want:
\begin{align}
(T_{5}g)(t) &= g(t-5) &
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t} \notag
\end{align}

\item
A slight variation is to replace \texttt{align*} (resp.,
\texttt{align}) with \texttt{flalign*} (resp., \texttt{flalign}),
which aligns the two blocks to the text margins:
\begin{flalign*}
(T_{5}g)(t) &= g(t-5) &
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t}
\end{flalign*}

Note, however, the awful placement of the equation number:
\begin{flalign}
(T_{5}g)(t) &= g(t-5) &
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t} \notag
\end{flalign}

\item
With \texttt{alignat*} (resp., \texttt{alignat}) you are
responsible for specifying both the number of alignments
and the horizontal space between them:
\begin{alignat*}{2}
(T_{5}g)(t) &= g(t-5) &\hspace{4em} % = 4*\quad
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t}
\end{alignat*}

With equation number(s):
\begin{alignat}{2}
(T_{5}g)(t) &= g(t-5) &\hspace{4em} % = 4*\quad
g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\
&&&= g(t-5)e^{2\pi i\left(\frac12\right)t} \notag
\end{alignat}

\item
So far we have seen solutions I'd \emph{deprecate};
let's see now one I'd \emph{recommend}: use an \texttt{alignedat}
environment.  With this, you can give a unique equation number
to the whole block of equations, which is probably what you want:
\begin{alignedat}{2} (T_{5}g)(t) &= g(t-5) &\hspace{4em} g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\ &&&= g(t-5)e^{2\pi i\left(\frac12\right)t} \end{alignedat}

Should you later change your mind and decide not to number the
equation, all you have to do is to add two asterisks
(to \texttt{equation}, not to \texttt{alignedat}):
\begin{equation*}\begin{alignedat}{2} (T_{5}g)(t) &= g(t-5) &\hspace{4em} g_{5,\frac12}(t) &= (M_{\frac12}T_{5}g)(t) \\ &&&= g(t-5)e^{2\pi i\left(\frac12\right)t} \end{alignedat}\end{equation*}
\end{enumerate}

\end{document}

• I shall, of course, vote in favour of your response very positively. If you think it is necessary, I can delete my answer. – Sebastiano Jul 19 '18 at 6:57
• @Sebastiano: First, I apologize for having been a bit rude yesterday; I spoke in a fit of temper. Second, if you look at my profile you’ll see that I very rarely downvote an answer: I do so only when I think, in full earnestness, that the answer contains an example of bad coding or of bad style that is really wrong to encourage publicly. I regret to say that I’m afraid this is the case. See my answer for an example of what I deem a correct way to exploit the align* environment (although with some caveats) to achive the desired layout. – GuM Jul 19 '18 at 11:48
• don't worry. You're right. I have I appreciate sincerity very much and you can be sure that I'm wrong a lot of times. The important thing is not to be evil, overbearing and humble. I hope I respect these adjectives. I have deleted my answer. – Sebastiano Jul 19 '18 at 19:07

If you are primarily looking at writing equations, I like to use KLatexFormula for windows. It allows me to drag and drop a picture of the equation where I want. Here is quick guide I use and found online. A quick guide to latex