0

Here is the code and errors shown!

This is latex Overleaf and I'm receiving this error with no idea on how to fix it

edit: Here is the code

\begin{definition}[Dirichlet Character]
Any map $\chi:(\mathbb{Z}/n\mathbb{Z})* \rightarrow \mathbb{C}$ is said to be a Dirichlet Character of modulus $n$ if for any two integers $a$ and $b$,

\begin{itemize}

\item $\chi(ab) = \chi(a)\chi(b) \hspace{2pt} \text{(multiplicity)}$ 
\item $\chi(a)$ = $\begin{cases}
$0$ & \text{if } $\gcd(a,n) > 1$ \\
\text{non-zero} & \text{if }$\gcd(a,n) = 1$ \\
\end{cases}$    \item $\chi(a+m)$ = $\chi(a)$ \text{(periodic with period $m$)}
\end{itemize}

\end{definition}
1
  • 7
    please show code as text, not an image but you have $ inside a cases environment, which is already math so generates an error. In general you have far too many $ so a = b$ not $a$ = $b$ Apr 27 at 19:33

1 Answer 1

2

This works, because each equations are in one math environment (see @DavidCarlisle comment):

\documentclass{article}
\usepackage{amsmath, amssymb, amsthm}
\theoremstyle{definition}  % for upright text in definition
\newtheorem{definition}{Definition}

\begin{document}
\begin{definition}[Dirichlet Character]
Any map $\chi:(\mathbb{Z}/n\mathbb{Z})* \rightarrow \mathbb{C}$ is said to be a Dirichlet Character of modulus $n$ if for any two integers $a$ and $b$,
    \begin{itemize}
\item $\chi(ab) = \chi(a)\chi(b)$ \quad(multiplicity)
\item $\chi(a) = \begin{cases}
            0   & \text{if } \gcd(a,n) > 1  \\
          \ne 0 & \text{if } \gcd(a,n) = 1  \\
                 \end{cases}$    
\item $\chi(a+m) = \chi(a)$      \quad(periodic with period $m$)
    \end{itemize}
\end{definition}
\end{document}

enter image description here

Edite: Considered @Mico comment.

2
  • +1. For the sake of good house-keeping, err good math typography, I would be tempted to (a) add the instruction \theoremstyle{definition} immediately before \newtheorem{definition}{Definition}, (b) replace \chi: with \chi\colon and (c) replace non-zero with \ne0.
    – Mico
    Apr 28 at 4:47
  • 1
    @Mico, thank you very much.
    – Zarko
    Apr 28 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.