Complex-valued arithmetic function
In analytic number theory  and related branches of mathematics, a complex-valued arithmetic function   
  
    
      
        χ 
        : 
        
          Z 
         
        → 
        
          C 
         
       
     
    {\displaystyle \chi :\mathbb {Z} \rightarrow \mathbb {C} } 
   
   is a Dirichlet character of modulus 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   (where 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   is a positive integer) if for all integers 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
   and 
  
    
      
        b 
       
     
    {\displaystyle b} 
   
  :[ 1]  
1. 
  
    
      
        χ 
        ( 
        a 
        b 
        ) 
        = 
        χ 
        ( 
        a 
        ) 
        χ 
        ( 
        b 
        ) 
        ; 
       
     
    {\displaystyle \chi (ab)=\chi (a)\chi (b);} 
   
   that is, 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   is completely multiplicative .  
2. 
  
    
      
        χ 
        ( 
        a 
        ) 
        = 
        0 
         
        ⟺ 
         
        gcd 
        ( 
        a 
        , 
        m 
        ) 
        > 
        1 
       
     
    {\displaystyle \chi (a)=0\iff \gcd(a,m)>1} 
   
  .  
3. 
  
    
      
        χ 
        ( 
        a 
        + 
        m 
        ) 
        = 
        χ 
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi (a+m)=\chi (a)} 
   
  ; that is, 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   is periodic with period 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
  .  
The simplest possible character, called the principal character  and usually denoted 
  
    
      
        
          χ 
          
            0 
           
         
       
     
    {\displaystyle \chi _{0}} 
   
  , exists for all moduli:[ 2]  
  
    
      
        
          χ 
          
            0 
           
         
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  0 
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  > 
                  1 
                 
               
              
                
                  1 
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  = 
                  1. 
                 
               
             
             
           
         
       
     
    {\displaystyle \chi _{0}(a)={\begin{cases}0&{\text{if }}\gcd(a,m)>1\\1&{\text{if }}\gcd(a,m)=1.\end{cases}}} 
   
  
Dirichlet characters were named after German mathematician Peter Gustav Lejeune Dirichlet , who introduced these functions in his 1837 paper on primes in arithmetic progressions .[ 3] [ 4]  
 
  
    
      
        ϕ 
        ( 
        n 
        ) 
       
     
    {\displaystyle \phi (n)} 
   
   is Euler's totient function .[ 5]  
  
    
      
        
          ζ 
          
            n 
           
         
       
     
    {\displaystyle \zeta _{n}} 
   
   is a complex primitive n-th root of unity :
  
    
      
        
          ζ 
          
            n 
           
          
            n 
           
         
        = 
        1 
        , 
       
     
    {\displaystyle \zeta _{n}^{n}=1,} 
   
   but 
  
    
      
        
          ζ 
          
            n 
           
         
        ≠ 
        1 
        , 
        
          ζ 
          
            n 
           
          
            2 
           
         
        ≠ 
        1 
        , 
        . 
        . 
        . 
        
          ζ 
          
            n 
           
          
            n 
            − 
            1 
           
         
        ≠ 
        1. 
       
     
    {\displaystyle \zeta _{n}\neq 1,\zeta _{n}^{2}\neq 1,...\zeta _{n}^{n-1}\neq 1.} 
   
  
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
   is the group of units mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
  . It has order 
  
    
      
        ϕ 
        ( 
        m 
        ) 
        . 
       
     
    {\displaystyle \phi (m).} 
   
  
  
    
      
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                m 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
       
     
    {\displaystyle {\widehat {(\mathbb {Z} /m\mathbb {Z} )^{\times }}}} 
   
   is the group of Dirichlet characters mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
  .
  
    
      
        p 
        , 
        
          p 
          
            k 
           
         
        , 
       
     
    {\displaystyle p,p_{k},} 
   
   etc. are  prime numbers .
  
    
      
        ( 
        m 
        , 
        n 
        ) 
       
     
    {\displaystyle (m,n)} 
   
   is a standard[ 6]   abbreviation[ 7]   for 
  
    
      
        gcd 
        ( 
        m 
        , 
        n 
        ) 
       
     
    {\displaystyle \gcd(m,n)} 
   
  
  
    
      
        χ 
        ( 
        a 
        ) 
        , 
        
          χ 
          ′ 
         
        ( 
        a 
        ) 
        , 
        
          χ 
          
            r 
           
         
        ( 
        a 
        ) 
        , 
       
     
    {\displaystyle \chi (a),\chi '(a),\chi _{r}(a),} 
   
   etc. are Dirichlet characters. (the lowercase Greek letter chi  for "character")
There is no standard notation for Dirichlet characters that includes the modulus. In many contexts (such as in the proof of Dirichlet's theorem) the modulus is fixed. In other contexts, such as this article, characters of different moduli appear. Where appropriate this article employs a variation of Conrey labeling  (introduced by Brian Conrey  and used by the LMFDB ).
In this labeling characters for modulus 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   are denoted 
  
    
      
        
          χ 
          
            m 
            , 
            t 
           
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi _{m,t}(a)} 
   
   where the index 
  
    
      
        t 
       
     
    {\displaystyle t} 
   
   is described in the section the group of characters  below. In this labeling, 
  
    
      
        
          χ 
          
            m 
            , 
            _ 
           
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi _{m,\_}(a)} 
   
   denotes an unspecified character and
  
    
      
        
          χ 
          
            m 
            , 
            1 
           
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi _{m,1}(a)} 
   
   denotes the principal character mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
  .
Relation to group characters [ edit ]  
The word "character " is used several ways in mathematics. In this section it refers to a homomorphism  from a group 
  
    
      
        G 
       
     
    {\displaystyle G} 
   
   (written multiplicatively) to the multiplicative group of the field of complex numbers:
  
    
      
        η 
        : 
        G 
        → 
        
          
            C 
           
          
            × 
           
         
        , 
         
         
        η 
        ( 
        g 
        h 
        ) 
        = 
        η 
        ( 
        g 
        ) 
        η 
        ( 
        h 
        ) 
        , 
         
         
        η 
        ( 
        
          g 
          
            − 
            1 
           
         
        ) 
        = 
        η 
        ( 
        g 
        
          ) 
          
            − 
            1 
           
         
        . 
       
     
    {\displaystyle \eta :G\rightarrow \mathbb {C} ^{\times },\;\;\eta (gh)=\eta (g)\eta (h),\;\;\eta (g^{-1})=\eta (g)^{-1}.} 
   
  
The set of characters is denoted 
  
    
      
        
          
            
              G 
              ^ 
             
           
         
        . 
       
     
    {\displaystyle {\widehat {G}}.} 
   
   If the product of two characters is defined by pointwise multiplication 
  
    
      
        η 
        θ 
        ( 
        a 
        ) 
        = 
        η 
        ( 
        a 
        ) 
        θ 
        ( 
        a 
        ) 
        , 
       
     
    {\displaystyle \eta \theta (a)=\eta (a)\theta (a),} 
   
   the identity by the trivial character 
  
    
      
        
          η 
          
            0 
           
         
        ( 
        a 
        ) 
        = 
        1 
       
     
    {\displaystyle \eta _{0}(a)=1} 
   
   and the inverse by complex inversion  
  
    
      
        
          η 
          
            − 
            1 
           
         
        ( 
        a 
        ) 
        = 
        η 
        ( 
        a 
        
          ) 
          
            − 
            1 
           
         
       
     
    {\displaystyle \eta ^{-1}(a)=\eta (a)^{-1}} 
   
   then 
  
    
      
        
          
            
              G 
              ^ 
             
           
         
       
     
    {\displaystyle {\widehat {G}}} 
   
   becomes an abelian group.[ 8]  
If 
  
    
      
        A 
       
     
    {\displaystyle A} 
   
   is a finite abelian group  then[ 9]   there is an isomorphism  
  
    
      
        A 
        ≅ 
        
          
            
              A 
              ^ 
             
           
         
       
     
    {\displaystyle A\cong {\widehat {A}}} 
   
  , and the orthogonality relations:[ 10]  
  
    
      
        
          ∑ 
          
            a 
            ∈ 
            A 
           
         
        η 
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  
                    | 
                   
                  A 
                  
                    | 
                   
                 
                
                  
                     if  
                   
                  η 
                  = 
                  
                    η 
                    
                      0 
                     
                   
                 
               
              
                
                  0 
                 
                
                  
                     if  
                   
                  η 
                  ≠ 
                  
                    η 
                    
                      0 
                     
                   
                 
               
             
             
           
         
       
     
    {\displaystyle \sum _{a\in A}\eta (a)={\begin{cases}|A|&{\text{ if  }}\eta =\eta _{0}\\0&{\text{ if  }}\eta \neq \eta _{0}\end{cases}}} 
   
       and      
  
    
      
        
          ∑ 
          
            η 
            ∈ 
            
              
                
                  A 
                  ^ 
                 
               
             
           
         
        η 
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  
                    | 
                   
                  A 
                  
                    | 
                   
                 
                
                  
                     if  
                   
                  a 
                  = 
                  1 
                 
               
              
                
                  0 
                 
                
                  
                     if  
                   
                  a 
                  ≠ 
                  1. 
                 
               
             
             
           
         
       
     
    {\displaystyle \sum _{\eta \in {\widehat {A}}}\eta (a)={\begin{cases}|A|&{\text{ if  }}a=1\\0&{\text{ if  }}a\neq 1.\end{cases}}} 
   
  
The elements of the finite abelian group 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
   are the residue classes 
  
    
      
        [ 
        a 
        ] 
        = 
        { 
        x 
        : 
        x 
        ≡ 
        a 
        
           
          ( 
          mod 
           
          m 
          ) 
         
        } 
       
     
    {\displaystyle [a]=\{x:x\equiv a{\pmod {m}}\}} 
   
   where 
  
    
      
        ( 
        a 
        , 
        m 
        ) 
        = 
        1. 
       
     
    {\displaystyle (a,m)=1.} 
   
  
A group character 
  
    
      
        ρ 
        : 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
        → 
        
          
            C 
           
          
            × 
           
         
       
     
    {\displaystyle \rho :(\mathbb {Z} /m\mathbb {Z} )^{\times }\rightarrow \mathbb {C} ^{\times }} 
   
   can be extended to a Dirichlet character 
  
    
      
        χ 
        : 
        
          Z 
         
        → 
        
          C 
         
       
     
    {\displaystyle \chi :\mathbb {Z} \rightarrow \mathbb {C} } 
   
   by defining
  
    
      
        χ 
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  0 
                 
                
                  
                    if  
                   
                  [ 
                  a 
                  ] 
                  ∉ 
                  ( 
                  
                    Z 
                   
                  
                    / 
                   
                  m 
                  
                    Z 
                   
                  
                    ) 
                    
                      × 
                     
                   
                 
                
                  
                    i.e.  
                   
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  > 
                  1 
                 
               
              
                
                  ρ 
                  ( 
                  [ 
                  a 
                  ] 
                  ) 
                 
                
                  
                    if  
                   
                  [ 
                  a 
                  ] 
                  ∈ 
                  ( 
                  
                    Z 
                   
                  
                    / 
                   
                  m 
                  
                    Z 
                   
                  
                    ) 
                    
                      × 
                     
                   
                 
                
                  
                    i.e.  
                   
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  = 
                  1 
                  , 
                 
               
             
             
           
         
       
     
    {\displaystyle \chi (a)={\begin{cases}0&{\text{if }}[a]\not \in (\mathbb {Z} /m\mathbb {Z} )^{\times }&{\text{i.e. }}(a,m)>1\\\rho ([a])&{\text{if }}[a]\in (\mathbb {Z} /m\mathbb {Z} )^{\times }&{\text{i.e. }}(a,m)=1,\end{cases}}} 
   
  
and conversely, a Dirichlet character mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   defines a group character on 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle (\mathbb {Z} /m\mathbb {Z} )^{\times }.} 
   
  
Paraphrasing Davenport,[ 11]   Dirichlet characters can be regarded as a particular case of  Abelian group characters. But this article follows Dirichlet in giving a direct and constructive account of them. This is partly for historical reasons, in that Dirichlet's work preceded by several decades the development of group theory, and partly for a mathematical reason, namely that the group in question has a simple and interesting structure which is obscured if one treats it as one treats the general Abelian group.
4) Since  
  
    
      
        gcd 
        ( 
        1 
        , 
        m 
        ) 
        = 
        1 
        , 
       
     
    {\displaystyle \gcd(1,m)=1,} 
   
   property 2) says 
  
    
      
        χ 
        ( 
        1 
        ) 
        ≠ 
        0 
       
     
    {\displaystyle \chi (1)\neq 0} 
   
   so it can be canceled from both sides of  
  
    
      
        χ 
        ( 
        1 
        ) 
        χ 
        ( 
        1 
        ) 
        = 
        χ 
        ( 
        1 
        × 
        1 
        ) 
        = 
        χ 
        ( 
        1 
        ) 
       
     
    {\displaystyle \chi (1)\chi (1)=\chi (1\times 1)=\chi (1)} 
   
  :
  
    
      
        χ 
        ( 
        1 
        ) 
        = 
        1. 
       
     
    {\displaystyle \chi (1)=1.} 
   
 [ 12]  
5) Property 3) is equivalent to
if 
  
    
      
        a 
        ≡ 
        b 
        
           
          ( 
          mod 
           
          m 
          ) 
         
       
     
    {\displaystyle a\equiv b{\pmod {m}}} 
   
     then 
  
    
      
        χ 
        ( 
        a 
        ) 
        = 
        χ 
        ( 
        b 
        ) 
        . 
       
     
    {\displaystyle \chi (a)=\chi (b).} 
   
   
6) Property 1) implies that, for any positive integer 
  
    
      
        n 
       
     
    {\displaystyle n} 
   
  
  
    
      
        χ 
        ( 
        
          a 
          
            n 
           
         
        ) 
        = 
        χ 
        ( 
        a 
        
          ) 
          
            n 
           
         
        . 
       
     
    {\displaystyle \chi (a^{n})=\chi (a)^{n}.} 
   
  
7) Euler's theorem  states that if 
  
    
      
        ( 
        a 
        , 
        m 
        ) 
        = 
        1 
       
     
    {\displaystyle (a,m)=1} 
   
   then 
  
    
      
        
          a 
          
            ϕ 
            ( 
            m 
            ) 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          m 
          ) 
         
        . 
       
     
    {\displaystyle a^{\phi (m)}\equiv 1{\pmod {m}}.} 
   
   Therefore,
  
    
      
        χ 
        ( 
        a 
        
          ) 
          
            ϕ 
            ( 
            m 
            ) 
           
         
        = 
        χ 
        ( 
        
          a 
          
            ϕ 
            ( 
            m 
            ) 
           
         
        ) 
        = 
        χ 
        ( 
        1 
        ) 
        = 
        1. 
       
     
    {\displaystyle \chi (a)^{\phi (m)}=\chi (a^{\phi (m)})=\chi (1)=1.} 
   
  
That is, the nonzero values of 
  
    
      
        χ 
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi (a)} 
   
   are 
  
    
      
        ϕ 
        ( 
        m 
        ) 
       
     
    {\displaystyle \phi (m)} 
   
  -th roots of unity :
  
    
      
        χ 
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  0 
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  > 
                  1 
                 
               
              
                
                  
                    ζ 
                    
                      ϕ 
                      ( 
                      m 
                      ) 
                     
                    
                      r 
                     
                   
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  = 
                  1 
                 
               
             
             
           
         
       
     
    {\displaystyle \chi (a)={\begin{cases}0&{\text{if }}\gcd(a,m)>1\\\zeta _{\phi (m)}^{r}&{\text{if }}\gcd(a,m)=1\end{cases}}} 
   
  
for some integer 
  
    
      
        r 
       
     
    {\displaystyle r} 
   
   which depends on 
  
    
      
        χ 
        , 
        ζ 
        , 
       
     
    {\displaystyle \chi ,\zeta ,} 
   
   and 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
  . This implies there are only a finite number of characters for a given modulus.
8) If 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   and 
  
    
      
        
          χ 
          ′ 
         
       
     
    {\displaystyle \chi '} 
   
   are two characters for the same modulus so is their product 
  
    
      
        χ 
        
          χ 
          ′ 
         
        , 
       
     
    {\displaystyle \chi \chi ',} 
   
   defined by pointwise multiplication:
  
    
      
        χ 
        
          χ 
          ′ 
         
        ( 
        a 
        ) 
        = 
        χ 
        ( 
        a 
        ) 
        
          χ 
          ′ 
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi \chi '(a)=\chi (a)\chi '(a)} 
   
     (
  
    
      
        χ 
        
          χ 
          ′ 
         
       
     
    {\displaystyle \chi \chi '} 
   
   obviously satisfies 1-3).[ 13]  
The principal character is an identity:
  
    
      
        χ 
        
          χ 
          
            0 
           
         
        ( 
        a 
        ) 
        = 
        χ 
        ( 
        a 
        ) 
        
          χ 
          
            0 
           
         
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  0 
                  × 
                  0 
                 
                
                  = 
                  χ 
                  ( 
                  a 
                  ) 
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  > 
                  1 
                 
               
              
                
                  χ 
                  ( 
                  a 
                  ) 
                  × 
                  1 
                 
                
                  = 
                  χ 
                  ( 
                  a 
                  ) 
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  = 
                  1. 
                 
               
             
             
           
         
       
     
    {\displaystyle \chi \chi _{0}(a)=\chi (a)\chi _{0}(a)={\begin{cases}0\times 0&=\chi (a)&{\text{if }}\gcd(a,m)>1\\\chi (a)\times 1&=\chi (a)&{\text{if }}\gcd(a,m)=1.\end{cases}}} 
   
  
9) Let 
  
    
      
        
          a 
          
            − 
            1 
           
         
       
     
    {\displaystyle a^{-1}} 
   
   denote the inverse of 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
    in 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
  .
Then
  
    
      
        χ 
        ( 
        a 
        ) 
        χ 
        ( 
        
          a 
          
            − 
            1 
           
         
        ) 
        = 
        χ 
        ( 
        a 
        
          a 
          
            − 
            1 
           
         
        ) 
        = 
        χ 
        ( 
        1 
        ) 
        = 
        1 
        , 
       
     
    {\displaystyle \chi (a)\chi (a^{-1})=\chi (aa^{-1})=\chi (1)=1,} 
   
   so 
  
    
      
        χ 
        ( 
        
          a 
          
            − 
            1 
           
         
        ) 
        = 
        χ 
        ( 
        a 
        
          ) 
          
            − 
            1 
           
         
        , 
       
     
    {\displaystyle \chi (a^{-1})=\chi (a)^{-1},} 
   
   which extends 6) to all integers. 
The complex conjugate  of a root of unity is also its inverse (see here  for details), so for 
  
    
      
        ( 
        a 
        , 
        m 
        ) 
        = 
        1 
       
     
    {\displaystyle (a,m)=1} 
   
  
  
    
      
        
          
            χ 
            ¯ 
           
         
        ( 
        a 
        ) 
        = 
        χ 
        ( 
        a 
        
          ) 
          
            − 
            1 
           
         
        = 
        χ 
        ( 
        
          a 
          
            − 
            1 
           
         
        ) 
        . 
       
     
    {\displaystyle {\overline {\chi }}(a)=\chi (a)^{-1}=\chi (a^{-1}).} 
   
     (
  
    
      
        
          
            χ 
            ¯ 
           
         
       
     
    {\displaystyle {\overline {\chi }}} 
   
   also obviously satisfies 1-3). 
Thus for all integers 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
  
  
    
      
        χ 
        ( 
        a 
        ) 
        
          
            χ 
            ¯ 
           
         
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  0 
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  > 
                  1 
                 
               
              
                
                  1 
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  = 
                  1 
                 
               
             
             
           
         
        ; 
       
     
    {\displaystyle \chi (a){\overline {\chi }}(a)={\begin{cases}0&{\text{if }}\gcd(a,m)>1\\1&{\text{if }}\gcd(a,m)=1\end{cases}};} 
   
     in other words  
  
    
      
        χ 
        
          
            χ 
            ¯ 
           
         
        = 
        
          χ 
          
            0 
           
         
       
     
    {\displaystyle \chi {\overline {\chi }}=\chi _{0}} 
   
  .  
10) The multiplication and identity defined in 8) and the inversion defined in 9) turn the set of Dirichlet characters for a given modulus into a finite abelian group .
The group of characters [ edit ]  
There are three different cases because the groups 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
    have different structures depending on whether 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   is a power of 2, a power of an odd prime, or the product of prime powers.[ 14]  
Powers of odd primes [ edit ]  
If 
  
    
      
        q 
        = 
        
          p 
          
            k 
           
         
       
     
    {\displaystyle q=p^{k}} 
   
   is an odd number 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        q 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /q\mathbb {Z} )^{\times }} 
   
   is cyclic of order 
  
    
      
        ϕ 
        ( 
        q 
        ) 
       
     
    {\displaystyle \phi (q)} 
   
  ; a generator is called a primitive root  mod 
  
    
      
        q 
       
     
    {\displaystyle q} 
   
  .[ 15]  
Let 
  
    
      
        
          g 
          
            q 
           
         
       
     
    {\displaystyle g_{q}} 
   
   be a primitive root and  for 
  
    
      
        ( 
        a 
        , 
        q 
        ) 
        = 
        1 
       
     
    {\displaystyle (a,q)=1} 
   
   define the function 
  
    
      
        
          ν 
          
            q 
           
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \nu _{q}(a)} 
   
   (the index  of 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
  ) by
  
    
      
        a 
        ≡ 
        
          g 
          
            q 
           
          
            
              ν 
              
                q 
               
             
            ( 
            a 
            ) 
           
         
        
           
          ( 
          mod 
           
          q 
          ) 
         
        , 
       
     
    {\displaystyle a\equiv g_{q}^{\nu _{q}(a)}{\pmod {q}},} 
   
  
  
    
      
        0 
        ≤ 
        
          ν 
          
            q 
           
         
        < 
        ϕ 
        ( 
        q 
        ) 
        . 
       
     
    {\displaystyle 0\leq \nu _{q}<\phi (q).} 
   
  
For 
  
    
      
        ( 
        a 
        b 
        , 
        q 
        ) 
        = 
        1 
        , 
         
         
        a 
        ≡ 
        b 
        
           
          ( 
          mod 
           
          q 
          ) 
         
       
     
    {\displaystyle (ab,q)=1,\;\;a\equiv b{\pmod {q}}} 
   
   if and only if 
  
    
      
        
          ν 
          
            q 
           
         
        ( 
        a 
        ) 
        = 
        
          ν 
          
            q 
           
         
        ( 
        b 
        ) 
        . 
       
     
    {\displaystyle \nu _{q}(a)=\nu _{q}(b).} 
   
   Since
  
    
      
        χ 
        ( 
        a 
        ) 
        = 
        χ 
        ( 
        
          g 
          
            q 
           
          
            
              ν 
              
                q 
               
             
            ( 
            a 
            ) 
           
         
        ) 
        = 
        χ 
        ( 
        
          g 
          
            q 
           
         
        
          ) 
          
            
              ν 
              
                q 
               
             
            ( 
            a 
            ) 
           
         
        , 
       
     
    {\displaystyle \chi (a)=\chi (g_{q}^{\nu _{q}(a)})=\chi (g_{q})^{\nu _{q}(a)},} 
   
     
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   is determined by its value at 
  
    
      
        
          g 
          
            q 
           
         
        . 
       
     
    {\displaystyle g_{q}.} 
   
  
Let 
  
    
      
        
          ω 
          
            q 
           
         
        = 
        
          ζ 
          
            ϕ 
            ( 
            q 
            ) 
           
         
       
     
    {\displaystyle \omega _{q}=\zeta _{\phi (q)}} 
   
    be a primitive 
  
    
      
        ϕ 
        ( 
        q 
        ) 
       
     
    {\displaystyle \phi (q)} 
   
  -th root of unity. From property 7) above the possible values of 
  
    
      
        χ 
        ( 
        
          g 
          
            q 
           
         
        ) 
       
     
    {\displaystyle \chi (g_{q})} 
   
   are
  
    
      
        
          ω 
          
            q 
           
         
        , 
        
          ω 
          
            q 
           
          
            2 
           
         
        , 
        . 
        . 
        . 
        
          ω 
          
            q 
           
          
            ϕ 
            ( 
            q 
            ) 
           
         
        = 
        1. 
       
     
    {\displaystyle \omega _{q},\omega _{q}^{2},...\omega _{q}^{\phi (q)}=1.} 
   
   These distinct values give rise to  
  
    
      
        ϕ 
        ( 
        q 
        ) 
       
     
    {\displaystyle \phi (q)} 
   
   Dirichlet characters mod 
  
    
      
        q 
        . 
       
     
    {\displaystyle q.} 
   
   For 
  
    
      
        ( 
        r 
        , 
        q 
        ) 
        = 
        1 
       
     
    {\displaystyle (r,q)=1} 
   
   define 
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi _{q,r}(a)} 
   
   as
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  0 
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  q 
                  ) 
                  > 
                  1 
                 
               
              
                
                  
                    ω 
                    
                      q 
                     
                    
                      
                        ν 
                        
                          q 
                         
                       
                      ( 
                      r 
                      ) 
                      
                        ν 
                        
                          q 
                         
                       
                      ( 
                      a 
                      ) 
                     
                   
                 
                
                  
                    if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  q 
                  ) 
                  = 
                  1. 
                 
               
             
             
           
         
       
     
    {\displaystyle \chi _{q,r}(a)={\begin{cases}0&{\text{if }}\gcd(a,q)>1\\\omega _{q}^{\nu _{q}(r)\nu _{q}(a)}&{\text{if }}\gcd(a,q)=1.\end{cases}}} 
   
  
Then for 
  
    
      
        ( 
        r 
        s 
        , 
        q 
        ) 
        = 
        1 
       
     
    {\displaystyle (rs,q)=1} 
   
   and all 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
   and 
  
    
      
        b 
       
     
    {\displaystyle b} 
   
  
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        ) 
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        b 
        ) 
        = 
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        b 
        ) 
        , 
       
     
    {\displaystyle \chi _{q,r}(a)\chi _{q,r}(b)=\chi _{q,r}(ab),} 
   
   showing that 
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
       
     
    {\displaystyle \chi _{q,r}} 
   
   is a character and 
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        ) 
        
          χ 
          
            q 
            , 
            s 
           
         
        ( 
        a 
        ) 
        = 
        
          χ 
          
            q 
            , 
            r 
            s 
           
         
        ( 
        a 
        ) 
        , 
       
     
    {\displaystyle \chi _{q,r}(a)\chi _{q,s}(a)=\chi _{q,rs}(a),} 
   
   which gives an explicit isomorphism 
  
    
      
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                
                  p 
                  
                    k 
                   
                 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        
          p 
          
            k 
           
         
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle {\widehat {(\mathbb {Z} /p^{k}\mathbb {Z} )^{\times }}}\cong (\mathbb {Z} /p^{k}\mathbb {Z} )^{\times }.} 
   
  
 Examples m  = 3, 5, 7, 9[ edit ]  
2 is a primitive root mod 3.   (
  
    
      
        ϕ 
        ( 
        3 
        ) 
        = 
        2 
       
     
    {\displaystyle \phi (3)=2} 
   
  )
  
    
      
        
          2 
          
            1 
           
         
        ≡ 
        2 
        , 
         
        
          2 
          
            2 
           
         
        ≡ 
        
          2 
          
            0 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          3 
          ) 
         
        , 
       
     
    {\displaystyle 2^{1}\equiv 2,\;2^{2}\equiv 2^{0}\equiv 1{\pmod {3}},} 
   
  
so the values of 
  
    
      
        
          ν 
          
            3 
           
         
       
     
    {\displaystyle \nu _{3}} 
   
   are
  
    
      
        
          
            
              
                
                  a 
                 
                
                  1 
                 
                
                  2 
                 
               
              
                
                  
                    ν 
                    
                      3 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}a&1&2\\\hline \nu _{3}(a)&0&1\\\end{array}}} 
   
  . 
The nonzero values of the characters mod 3 are
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  2 
                 
               
              
                
                  
                    χ 
                    
                      3 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      3 
                      , 
                      2 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&1&2\\\hline \chi _{3,1}&1&1\\\chi _{3,2}&1&-1\\\end{array}}} 
   
  
2 is a primitive root mod 5.   (
  
    
      
        ϕ 
        ( 
        5 
        ) 
        = 
        4 
       
     
    {\displaystyle \phi (5)=4} 
   
  )
  
    
      
        
          2 
          
            1 
           
         
        ≡ 
        2 
        , 
         
        
          2 
          
            2 
           
         
        ≡ 
        4 
        , 
         
        
          2 
          
            3 
           
         
        ≡ 
        3 
        , 
         
        
          2 
          
            4 
           
         
        ≡ 
        
          2 
          
            0 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          5 
          ) 
         
        , 
       
     
    {\displaystyle 2^{1}\equiv 2,\;2^{2}\equiv 4,\;2^{3}\equiv 3,\;2^{4}\equiv 2^{0}\equiv 1{\pmod {5}},} 
   
  
so the values of 
  
    
      
        
          ν 
          
            5 
           
         
       
     
    {\displaystyle \nu _{5}} 
   
   are
  
    
      
        
          
            
              
                
                  a 
                 
                
                  1 
                 
                
                  2 
                 
                
                  3 
                 
                
                  4 
                 
               
              
                
                  
                    ν 
                    
                      5 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  1 
                 
                
                  3 
                 
                
                  2 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}a&1&2&3&4\\\hline \nu _{5}(a)&0&1&3&2\\\end{array}}} 
   
  . 
The nonzero values of the characters mod 5 are
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  2 
                 
                
                  3 
                 
                
                  4 
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      2 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      3 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      4 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&1&2&3&4\\\hline \chi _{5,1}&1&1&1&1\\\chi _{5,2}&1&i&-i&-1\\\chi _{5,3}&1&-i&i&-1\\\chi _{5,4}&1&-1&-1&1\\\end{array}}} 
   
  
3 is a primitive root mod 7.   (
  
    
      
        ϕ 
        ( 
        7 
        ) 
        = 
        6 
       
     
    {\displaystyle \phi (7)=6} 
   
  )
  
    
      
        
          3 
          
            1 
           
         
        ≡ 
        3 
        , 
         
        
          3 
          
            2 
           
         
        ≡ 
        2 
        , 
         
        
          3 
          
            3 
           
         
        ≡ 
        6 
        , 
         
        
          3 
          
            4 
           
         
        ≡ 
        4 
        , 
         
        
          3 
          
            5 
           
         
        ≡ 
        5 
        , 
         
        
          3 
          
            6 
           
         
        ≡ 
        
          3 
          
            0 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          7 
          ) 
         
        , 
       
     
    {\displaystyle 3^{1}\equiv 3,\;3^{2}\equiv 2,\;3^{3}\equiv 6,\;3^{4}\equiv 4,\;3^{5}\equiv 5,\;3^{6}\equiv 3^{0}\equiv 1{\pmod {7}},} 
   
  
so the values of 
  
    
      
        
          ν 
          
            7 
           
         
       
     
    {\displaystyle \nu _{7}} 
   
   are
  
    
      
        
          
            
              
                
                  a 
                 
                
                  1 
                 
                
                  2 
                 
                
                  3 
                 
                
                  4 
                 
                
                  5 
                 
                
                  6 
                 
               
              
                
                  
                    ν 
                    
                      7 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  2 
                 
                
                  1 
                 
                
                  4 
                 
                
                  5 
                 
                
                  3 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}a&1&2&3&4&5&6\\\hline \nu _{7}(a)&0&2&1&4&5&3\\\end{array}}} 
   
  . 
The nonzero values of the characters mod 7 are (
  
    
      
        ω 
        = 
        
          ζ 
          
            6 
           
         
        , 
         
         
        
          ω 
          
            3 
           
         
        = 
        − 
        1 
       
     
    {\displaystyle \omega =\zeta _{6},\;\;\omega ^{3}=-1} 
   
  )
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  2 
                 
                
                  3 
                 
                
                  4 
                 
                
                  5 
                 
                
                  6 
                 
               
              
                
                  
                    χ 
                    
                      7 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      7 
                      , 
                      2 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  ω 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  ω 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      7 
                      , 
                      3 
                     
                   
                 
                
                  1 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  ω 
                 
                
                  − 
                  ω 
                 
                
                  − 
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      7 
                      , 
                      4 
                     
                   
                 
                
                  1 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  ω 
                 
                
                  − 
                  ω 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      7 
                      , 
                      5 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  ω 
                 
                
                  − 
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  ω 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      7 
                      , 
                      6 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&1&2&3&4&5&6\\\hline \chi _{7,1}&1&1&1&1&1&1\\\chi _{7,2}&1&-\omega &\omega ^{2}&\omega ^{2}&-\omega &1\\\chi _{7,3}&1&\omega ^{2}&\omega &-\omega &-\omega ^{2}&-1\\\chi _{7,4}&1&\omega ^{2}&-\omega &-\omega &\omega ^{2}&1\\\chi _{7,5}&1&-\omega &-\omega ^{2}&\omega ^{2}&\omega &-1\\\chi _{7,6}&1&1&-1&1&-1&-1\\\end{array}}} 
   
  . 
2 is a primitive root mod 9.   (
  
    
      
        ϕ 
        ( 
        9 
        ) 
        = 
        6 
       
     
    {\displaystyle \phi (9)=6} 
   
  )
  
    
      
        
          2 
          
            1 
           
         
        ≡ 
        2 
        , 
         
        
          2 
          
            2 
           
         
        ≡ 
        4 
        , 
         
        
          2 
          
            3 
           
         
        ≡ 
        8 
        , 
         
        
          2 
          
            4 
           
         
        ≡ 
        7 
        , 
         
        
          2 
          
            5 
           
         
        ≡ 
        5 
        , 
         
        
          2 
          
            6 
           
         
        ≡ 
        
          2 
          
            0 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          9 
          ) 
         
        , 
       
     
    {\displaystyle 2^{1}\equiv 2,\;2^{2}\equiv 4,\;2^{3}\equiv 8,\;2^{4}\equiv 7,\;2^{5}\equiv 5,\;2^{6}\equiv 2^{0}\equiv 1{\pmod {9}},} 
   
  
so the values of 
  
    
      
        
          ν 
          
            9 
           
         
       
     
    {\displaystyle \nu _{9}} 
   
   are
  
    
      
        
          
            
              
                
                  a 
                 
                
                  1 
                 
                
                  2 
                 
                
                  4 
                 
                
                  5 
                 
                
                  7 
                 
                
                  8 
                 
               
              
                
                  
                    ν 
                    
                      9 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  1 
                 
                
                  2 
                 
                
                  5 
                 
                
                  4 
                 
                
                  3 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}a&1&2&4&5&7&8\\\hline \nu _{9}(a)&0&1&2&5&4&3\\\end{array}}} 
   
  . 
The nonzero values of the characters mod 9 are (
  
    
      
        ω 
        = 
        
          ζ 
          
            6 
           
         
        , 
         
         
        
          ω 
          
            3 
           
         
        = 
        − 
        1 
       
     
    {\displaystyle \omega =\zeta _{6},\;\;\omega ^{3}=-1} 
   
  )
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  2 
                 
                
                  4 
                 
                
                  5 
                 
                
                  7 
                 
                
                  8 
                 
               
              
                
                  
                    χ 
                    
                      9 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      9 
                      , 
                      2 
                     
                   
                 
                
                  1 
                 
                
                  ω 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  ω 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      9 
                      , 
                      4 
                     
                   
                 
                
                  1 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  ω 
                 
                
                  − 
                  ω 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      9 
                      , 
                      5 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  ω 
                 
                
                  ω 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      9 
                      , 
                      7 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  ω 
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  
                    ω 
                    
                      2 
                     
                   
                 
                
                  − 
                  ω 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      9 
                      , 
                      8 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&1&2&4&5&7&8\\\hline \chi _{9,1}&1&1&1&1&1&1\\\chi _{9,2}&1&\omega &\omega ^{2}&-\omega ^{2}&-\omega &-1\\\chi _{9,4}&1&\omega ^{2}&-\omega &-\omega &\omega ^{2}&1\\\chi _{9,5}&1&-\omega ^{2}&-\omega &\omega &\omega ^{2}&-1\\\chi _{9,7}&1&-\omega &\omega ^{2}&\omega ^{2}&-\omega &1\\\chi _{9,8}&1&-1&1&-1&1&-1\\\end{array}}} 
   
  . 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        2 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /2\mathbb {Z} )^{\times }} 
   
   is the trivial group  with one element. 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        4 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /4\mathbb {Z} )^{\times }} 
   
   is cyclic of order 2. For 8, 16, and higher powers of 2, there is no primitive root; the powers of 5 are the units 
  
    
      
        ≡ 
        1 
        
           
          ( 
          mod 
           
          4 
          ) 
         
       
     
    {\displaystyle \equiv 1{\pmod {4}}} 
   
   and their negatives are the units 
  
    
      
        ≡ 
        3 
        
           
          ( 
          mod 
           
          4 
          ) 
         
        . 
       
     
    {\displaystyle \equiv 3{\pmod {4}}.} 
   
 [ 16]  
For example
  
    
      
        
          5 
          
            1 
           
         
        ≡ 
        5 
        , 
         
        
          5 
          
            2 
           
         
        ≡ 
        
          5 
          
            0 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          8 
          ) 
         
       
     
    {\displaystyle 5^{1}\equiv 5,\;5^{2}\equiv 5^{0}\equiv 1{\pmod {8}}} 
   
  
  
    
      
        
          5 
          
            1 
           
         
        ≡ 
        5 
        , 
         
        
          5 
          
            2 
           
         
        ≡ 
        9 
        , 
         
        
          5 
          
            3 
           
         
        ≡ 
        13 
        , 
         
        
          5 
          
            4 
           
         
        ≡ 
        
          5 
          
            0 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          16 
          ) 
         
       
     
    {\displaystyle 5^{1}\equiv 5,\;5^{2}\equiv 9,\;5^{3}\equiv 13,\;5^{4}\equiv 5^{0}\equiv 1{\pmod {16}}} 
   
  
  
    
      
        
          5 
          
            1 
           
         
        ≡ 
        5 
        , 
         
        
          5 
          
            2 
           
         
        ≡ 
        25 
        , 
         
        
          5 
          
            3 
           
         
        ≡ 
        29 
        , 
         
        
          5 
          
            4 
           
         
        ≡ 
        17 
        , 
         
        
          5 
          
            5 
           
         
        ≡ 
        21 
        , 
         
        
          5 
          
            6 
           
         
        ≡ 
        9 
        , 
         
        
          5 
          
            7 
           
         
        ≡ 
        13 
        , 
         
        
          5 
          
            8 
           
         
        ≡ 
        
          5 
          
            0 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          32 
          ) 
         
        . 
       
     
    {\displaystyle 5^{1}\equiv 5,\;5^{2}\equiv 25,\;5^{3}\equiv 29,\;5^{4}\equiv 17,\;5^{5}\equiv 21,\;5^{6}\equiv 9,\;5^{7}\equiv 13,\;5^{8}\equiv 5^{0}\equiv 1{\pmod {32}}.} 
   
  
Let 
  
    
      
        q 
        = 
        
          2 
          
            k 
           
         
        , 
         
         
        k 
        ≥ 
        3 
       
     
    {\displaystyle q=2^{k},\;\;k\geq 3} 
   
  ; then 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        q 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /q\mathbb {Z} )^{\times }} 
   
   is the direct product of a cyclic group  of order 2 (generated by −1) and a cyclic group of order 
  
    
      
        
          
            
              ϕ 
              ( 
              q 
              ) 
             
            2 
           
         
       
     
    {\displaystyle {\frac {\phi (q)}{2}}} 
   
   (generated by 5).
For odd numbers 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
   define the functions 
  
    
      
        
          ν 
          
            0 
           
         
       
     
    {\displaystyle \nu _{0}} 
   
   and 
  
    
      
        
          ν 
          
            q 
           
         
       
     
    {\displaystyle \nu _{q}} 
   
   by
  
    
      
        a 
        ≡ 
        ( 
        − 
        1 
        
          ) 
          
            
              ν 
              
                0 
               
             
            ( 
            a 
            ) 
           
         
        
          5 
          
            
              ν 
              
                q 
               
             
            ( 
            a 
            ) 
           
         
        
           
          ( 
          mod 
           
          q 
          ) 
         
        , 
       
     
    {\displaystyle a\equiv (-1)^{\nu _{0}(a)}5^{\nu _{q}(a)}{\pmod {q}},} 
   
  
  
    
      
        0 
        ≤ 
        
          ν 
          
            0 
           
         
        < 
        2 
        , 
         
         
        0 
        ≤ 
        
          ν 
          
            q 
           
         
        < 
        
          
            
              ϕ 
              ( 
              q 
              ) 
             
            2 
           
         
        . 
       
     
    {\displaystyle 0\leq \nu _{0}<2,\;\;0\leq \nu _{q}<{\frac {\phi (q)}{2}}.} 
   
  
For odd 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
   and 
  
    
      
        b 
        , 
         
         
        a 
        ≡ 
        b 
        
           
          ( 
          mod 
           
          q 
          ) 
         
       
     
    {\displaystyle b,\;\;a\equiv b{\pmod {q}}} 
   
   if and only if 
  
    
      
        
          ν 
          
            0 
           
         
        ( 
        a 
        ) 
        = 
        
          ν 
          
            0 
           
         
        ( 
        b 
        ) 
       
     
    {\displaystyle \nu _{0}(a)=\nu _{0}(b)} 
   
   and 
  
    
      
        
          ν 
          
            q 
           
         
        ( 
        a 
        ) 
        = 
        
          ν 
          
            q 
           
         
        ( 
        b 
        ) 
        . 
       
     
    {\displaystyle \nu _{q}(a)=\nu _{q}(b).} 
   
  
For odd 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
   the value of 
  
    
      
        χ 
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi (a)} 
   
   is determined by the values of 
  
    
      
        χ 
        ( 
        − 
        1 
        ) 
       
     
    {\displaystyle \chi (-1)} 
   
   and 
  
    
      
        χ 
        ( 
        5 
        ) 
        . 
       
     
    {\displaystyle \chi (5).} 
   
  
Let 
  
    
      
        
          ω 
          
            q 
           
         
        = 
        
          ζ 
          
            
              
                ϕ 
                ( 
                q 
                ) 
               
              2 
             
           
         
       
     
    {\displaystyle \omega _{q}=\zeta _{\frac {\phi (q)}{2}}} 
   
   be a primitive 
  
    
      
        
          
            
              ϕ 
              ( 
              q 
              ) 
             
            2 
           
         
       
     
    {\displaystyle {\frac {\phi (q)}{2}}} 
   
  -th root of unity. The possible values of 
  
    
      
        χ 
        ( 
        ( 
        − 
        1 
        
          ) 
          
            
              ν 
              
                0 
               
             
            ( 
            a 
            ) 
           
         
        
          5 
          
            
              ν 
              
                q 
               
             
            ( 
            a 
            ) 
           
         
        ) 
       
     
    {\displaystyle \chi ((-1)^{\nu _{0}(a)}5^{\nu _{q}(a)})} 
   
   are
  
    
      
        ± 
        
          ω 
          
            q 
           
         
        , 
        ± 
        
          ω 
          
            q 
           
          
            2 
           
         
        , 
        . 
        . 
        . 
        ± 
        
          ω 
          
            q 
           
          
            
              
                ϕ 
                ( 
                q 
                ) 
               
              2 
             
           
         
        = 
        ± 
        1. 
       
     
    {\displaystyle \pm \omega _{q},\pm \omega _{q}^{2},...\pm \omega _{q}^{\frac {\phi (q)}{2}}=\pm 1.} 
   
   These distinct values give rise to  
  
    
      
        ϕ 
        ( 
        q 
        ) 
       
     
    {\displaystyle \phi (q)} 
   
   Dirichlet characters mod 
  
    
      
        q 
        . 
       
     
    {\displaystyle q.} 
   
   For odd 
  
    
      
        r 
       
     
    {\displaystyle r} 
   
   define 
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi _{q,r}(a)} 
   
   by
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  0 
                 
                
                  
                    if  
                   
                  a 
                  
                     is even 
                   
                 
               
              
                
                  ( 
                  − 
                  1 
                  
                    ) 
                    
                      
                        ν 
                        
                          0 
                         
                       
                      ( 
                      r 
                      ) 
                      
                        ν 
                        
                          0 
                         
                       
                      ( 
                      a 
                      ) 
                     
                   
                  
                    ω 
                    
                      q 
                     
                    
                      
                        ν 
                        
                          q 
                         
                       
                      ( 
                      r 
                      ) 
                      
                        ν 
                        
                          q 
                         
                       
                      ( 
                      a 
                      ) 
                     
                   
                 
                
                  
                    if  
                   
                  a 
                  
                     is odd 
                   
                  . 
                 
               
             
             
           
         
       
     
    {\displaystyle \chi _{q,r}(a)={\begin{cases}0&{\text{if }}a{\text{ is even}}\\(-1)^{\nu _{0}(r)\nu _{0}(a)}\omega _{q}^{\nu _{q}(r)\nu _{q}(a)}&{\text{if }}a{\text{ is odd}}.\end{cases}}} 
   
  
Then for odd 
  
    
      
        r 
       
     
    {\displaystyle r} 
   
   and 
  
    
      
        s 
       
     
    {\displaystyle s} 
   
   and all 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
   and 
  
    
      
        b 
       
     
    {\displaystyle b} 
   
  
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        ) 
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        b 
        ) 
        = 
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        b 
        ) 
       
     
    {\displaystyle \chi _{q,r}(a)\chi _{q,r}(b)=\chi _{q,r}(ab)} 
   
   showing that 
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
       
     
    {\displaystyle \chi _{q,r}} 
   
   is a character and 
  
    
      
        
          χ 
          
            q 
            , 
            r 
           
         
        ( 
        a 
        ) 
        
          χ 
          
            q 
            , 
            s 
           
         
        ( 
        a 
        ) 
        = 
        
          χ 
          
            q 
            , 
            r 
            s 
           
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi _{q,r}(a)\chi _{q,s}(a)=\chi _{q,rs}(a)} 
   
   showing that 
  
    
      
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                
                  2 
                  
                    k 
                   
                 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        
          2 
          
            k 
           
         
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle {\widehat {(\mathbb {Z} /2^{k}\mathbb {Z} )^{\times }}}\cong (\mathbb {Z} /2^{k}\mathbb {Z} )^{\times }.} 
   
  
 Examples m  = 2, 4, 8, 16[ edit ]  
The only character mod 2 is the principal character 
  
    
      
        
          χ 
          
            2 
            , 
            1 
           
         
       
     
    {\displaystyle \chi _{2,1}} 
   
  .
−1 is a primitive root mod 4 (
  
    
      
        ϕ 
        ( 
        4 
        ) 
        = 
        2 
       
     
    {\displaystyle \phi (4)=2} 
   
  )
  
    
      
        
          
            
              
                
                  a 
                 
                
                  1 
                 
                
                  3 
                 
               
              
                
                  
                    ν 
                    
                      0 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}a&1&3\\\hline \nu _{0}(a)&0&1\\\end{array}}} 
   
  
The  nonzero values of the characters mod 4 are
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  3 
                 
               
              
                
                  
                    χ 
                    
                      4 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      4 
                      , 
                      3 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&1&3\\\hline \chi _{4,1}&1&1\\\chi _{4,3}&1&-1\\\end{array}}} 
   
  
−1 is and 5 generate the units mod 8 (
  
    
      
        ϕ 
        ( 
        8 
        ) 
        = 
        4 
       
     
    {\displaystyle \phi (8)=4} 
   
  )
  
    
      
        
          
            
              
                
                  a 
                 
                
                  1 
                 
                
                  3 
                 
                
                  5 
                 
                
                  7 
                 
               
              
                
                  
                    ν 
                    
                      0 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  1 
                 
                
                  0 
                 
                
                  1 
                 
               
              
                
                  
                    ν 
                    
                      8 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  1 
                 
                
                  1 
                 
                
                  0 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}a&1&3&5&7\\\hline \nu _{0}(a)&0&1&0&1\\\nu _{8}(a)&0&1&1&0\\\end{array}}} 
   
  . 
The  nonzero values of the characters mod 8 are
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  3 
                 
                
                  5 
                 
                
                  7 
                 
               
              
                
                  
                    χ 
                    
                      8 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      8 
                      , 
                      3 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      8 
                      , 
                      5 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      8 
                      , 
                      7 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&1&3&5&7\\\hline \chi _{8,1}&1&1&1&1\\\chi _{8,3}&1&1&-1&-1\\\chi _{8,5}&1&-1&-1&1\\\chi _{8,7}&1&-1&1&-1\\\end{array}}} 
   
  
−1 and 5 generate the units mod 16 (
  
    
      
        ϕ 
        ( 
        16 
        ) 
        = 
        8 
       
     
    {\displaystyle \phi (16)=8} 
   
  )
  
    
      
        
          
            
              
                
                  a 
                 
                
                  1 
                 
                
                  3 
                 
                
                  5 
                 
                
                  7 
                 
                
                  9 
                 
                
                  11 
                 
                
                  13 
                 
                
                  15 
                 
               
              
                
                  
                    ν 
                    
                      0 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  0 
                 
                
                  1 
                 
               
              
                
                  
                    ν 
                    
                      16 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  0 
                 
                
                  3 
                 
                
                  1 
                 
                
                  2 
                 
                
                  2 
                 
                
                  1 
                 
                
                  3 
                 
                
                  0 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}a&1&3&5&7&9&11&13&15\\\hline \nu _{0}(a)&0&1&0&1&0&1&0&1\\\nu _{16}(a)&0&3&1&2&2&1&3&0\\\end{array}}} 
   
  . 
The  nonzero values of the characters mod 16 are
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  3 
                 
                
                  5 
                 
                
                  7 
                 
                
                  9 
                 
                
                  11 
                 
                
                  13 
                 
                
                  15 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      3 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      5 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      7 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      9 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      11 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      13 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      15 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}&1&3&5&7&9&11&13&15\\\hline \chi _{16,1}&1&1&1&1&1&1&1&1\\\chi _{16,3}&1&-i&-i&1&-1&i&i&-1\\\chi _{16,5}&1&-i&i&-1&-1&i&-i&1\\\chi _{16,7}&1&1&-1&-1&1&1&-1&-1\\\chi _{16,9}&1&-1&-1&1&1&-1&-1&1\\\chi _{16,11}&1&i&i&1&-1&-i&-i&-1\\\chi _{16,13}&1&i&-i&-1&-1&-i&i&1\\\chi _{16,15}&1&-1&1&-1&1&-1&1&-1\\\end{array}}} 
   
  . 
Products of prime powers [ edit ]  
Let 
  
    
      
        m 
        = 
        
          p 
          
            1 
           
          
            
              m 
              
                1 
               
             
           
         
        
          p 
          
            2 
           
          
            
              m 
              
                2 
               
             
           
         
        ⋯ 
        
          p 
          
            k 
           
          
            
              m 
              
                k 
               
             
           
         
        = 
        
          q 
          
            1 
           
         
        
          q 
          
            2 
           
         
        ⋯ 
        
          q 
          
            k 
           
         
       
     
    {\displaystyle m=p_{1}^{m_{1}}p_{2}^{m_{2}}\cdots p_{k}^{m_{k}}=q_{1}q_{2}\cdots q_{k}} 
   
   where 
  
    
      
        
          p 
          
            1 
           
         
        < 
        
          p 
          
            2 
           
         
        < 
        ⋯ 
        < 
        
          p 
          
            k 
           
         
       
     
    {\displaystyle p_{1}<p_{2}<\dots <p_{k}} 
   
   be the factorization of 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   into prime powers. The group of units mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   is isomorphic to the direct product of the groups mod the 
  
    
      
        
          q 
          
            i 
           
         
       
     
    {\displaystyle q_{i}} 
   
  :[ 17]  
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        
          q 
          
            1 
           
         
        
          Z 
         
        
          ) 
          
            × 
           
         
        × 
        ( 
        
          Z 
         
        
          / 
         
        
          q 
          
            2 
           
         
        
          Z 
         
        
          ) 
          
            × 
           
         
        × 
        ⋯ 
        × 
        ( 
        
          Z 
         
        
          / 
         
        
          q 
          
            k 
           
         
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle (\mathbb {Z} /m\mathbb {Z} )^{\times }\cong (\mathbb {Z} /q_{1}\mathbb {Z} )^{\times }\times (\mathbb {Z} /q_{2}\mathbb {Z} )^{\times }\times \dots \times (\mathbb {Z} /q_{k}\mathbb {Z} )^{\times }.} 
   
  
This means that 1) there is a one-to-one correspondence between 
  
    
      
        a 
        ∈ 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle a\in (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
   and 
  
    
      
        k 
       
     
    {\displaystyle k} 
   
  -tuples 
  
    
      
        ( 
        
          a 
          
            1 
           
         
        , 
        
          a 
          
            2 
           
         
        , 
        … 
        , 
        
          a 
          
            k 
           
         
        ) 
       
     
    {\displaystyle (a_{1},a_{2},\dots ,a_{k})} 
   
   where 
  
    
      
        
          a 
          
            i 
           
         
        ∈ 
        ( 
        
          Z 
         
        
          / 
         
        
          q 
          
            i 
           
         
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle a_{i}\in (\mathbb {Z} /q_{i}\mathbb {Z} )^{\times }} 
   
   
and 2) multiplication mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   corresponds to coordinate-wise multiplication of 
  
    
      
        k 
       
     
    {\displaystyle k} 
   
  -tuples:  
  
    
      
        a 
        b 
        ≡ 
        c 
        
           
          ( 
          mod 
           
          m 
          ) 
         
       
     
    {\displaystyle ab\equiv c{\pmod {m}}} 
   
   corresponds to 
  
    
      
        ( 
        
          a 
          
            1 
           
         
        , 
        
          a 
          
            2 
           
         
        , 
        … 
        , 
        
          a 
          
            k 
           
         
        ) 
        × 
        ( 
        
          b 
          
            1 
           
         
        , 
        
          b 
          
            2 
           
         
        , 
        … 
        , 
        
          b 
          
            k 
           
         
        ) 
        = 
        ( 
        
          c 
          
            1 
           
         
        , 
        
          c 
          
            2 
           
         
        , 
        … 
        , 
        
          c 
          
            k 
           
         
        ) 
       
     
    {\displaystyle (a_{1},a_{2},\dots ,a_{k})\times (b_{1},b_{2},\dots ,b_{k})=(c_{1},c_{2},\dots ,c_{k})} 
   
   where 
  
    
      
        
          c 
          
            i 
           
         
        ≡ 
        
          a 
          
            i 
           
         
        
          b 
          
            i 
           
         
        
           
          ( 
          mod 
           
          
            q 
            
              i 
             
           
          ) 
         
        . 
       
     
    {\displaystyle c_{i}\equiv a_{i}b_{i}{\pmod {q_{i}}}.} 
   
  
The Chinese remainder theorem  (CRT) implies that the 
  
    
      
        
          a 
          
            i 
           
         
       
     
    {\displaystyle a_{i}} 
   
   are simply 
  
    
      
        
          a 
          
            i 
           
         
        ≡ 
        a 
        
           
          ( 
          mod 
           
          
            q 
            
              i 
             
           
          ) 
         
        . 
       
     
    {\displaystyle a_{i}\equiv a{\pmod {q_{i}}}.} 
   
  
There are subgroups 
  
    
      
        
          G 
          
            i 
           
         
        < 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle G_{i}<(\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
   such that [ 18]  
  
    
      
        
          G 
          
            i 
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        
          q 
          
            i 
           
         
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle G_{i}\cong (\mathbb {Z} /q_{i}\mathbb {Z} )^{\times }} 
   
   and 
  
    
      
        
          G 
          
            i 
           
         
        ≡ 
        
          
            { 
            
              
                
                  ( 
                  
                    Z 
                   
                  
                    / 
                   
                  
                    q 
                    
                      i 
                     
                   
                  
                    Z 
                   
                  
                    ) 
                    
                      × 
                     
                   
                 
                
                   
                  mod 
                   
                   
                  
                    q 
                    
                      i 
                     
                   
                 
               
              
                
                  { 
                  1 
                  } 
                 
                
                   
                  mod 
                   
                   
                  
                    q 
                    
                      j 
                     
                   
                  , 
                  j 
                  ≠ 
                  i 
                  . 
                 
               
             
             
           
         
       
     
    {\displaystyle G_{i}\equiv {\begin{cases}(\mathbb {Z} /q_{i}\mathbb {Z} )^{\times }&\mod q_{i}\\\{1\}&\mod q_{j},j\neq i.\end{cases}}} 
   
  
Then 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
        ≅ 
        
          G 
          
            1 
           
         
        × 
        
          G 
          
            2 
           
         
        × 
        . 
        . 
        . 
        × 
        
          G 
          
            k 
           
         
       
     
    {\displaystyle (\mathbb {Z} /m\mathbb {Z} )^{\times }\cong G_{1}\times G_{2}\times ...\times G_{k}} 
   
  
and every 
  
    
      
        a 
        ∈ 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle a\in (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
   corresponds to a 
  
    
      
        k 
       
     
    {\displaystyle k} 
   
  -tuple  
  
    
      
        ( 
        
          a 
          
            1 
           
         
        , 
        
          a 
          
            2 
           
         
        , 
        . 
        . 
        . 
        
          a 
          
            k 
           
         
        ) 
       
     
    {\displaystyle (a_{1},a_{2},...a_{k})} 
   
   where 
  
    
      
        
          a 
          
            i 
           
         
        ∈ 
        
          G 
          
            i 
           
         
       
     
    {\displaystyle a_{i}\in G_{i}} 
   
   and 
  
    
      
        
          a 
          
            i 
           
         
        ≡ 
        a 
        
           
          ( 
          mod 
           
          
            q 
            
              i 
             
           
          ) 
         
        . 
       
     
    {\displaystyle a_{i}\equiv a{\pmod {q_{i}}}.} 
   
    
Every 
  
    
      
        a 
        ∈ 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle a\in (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
   can be uniquely factored as 
  
    
      
        a 
        = 
        
          a 
          
            1 
           
         
        
          a 
          
            2 
           
         
        . 
        . 
        . 
        
          a 
          
            k 
           
         
        . 
       
     
    {\displaystyle a=a_{1}a_{2}...a_{k}.} 
   
  
[ 19]  
[ 20]  
If 
  
    
      
        
          χ 
          
            m 
            , 
            _ 
           
         
       
     
    {\displaystyle \chi _{m,\_}} 
   
   is a character mod 
  
    
      
        m 
        , 
       
     
    {\displaystyle m,} 
   
   on the subgroup 
  
    
      
        
          G 
          
            i 
           
         
       
     
    {\displaystyle G_{i}} 
   
   it must be identical to some 
  
    
      
        
          χ 
          
            
              q 
              
                i 
               
             
            , 
            _ 
           
         
       
     
    {\displaystyle \chi _{q_{i},\_}} 
   
   mod 
  
    
      
        
          q 
          
            i 
           
         
       
     
    {\displaystyle q_{i}} 
   
   Then
  
    
      
        
          χ 
          
            m 
            , 
            _ 
           
         
        ( 
        a 
        ) 
        = 
        
          χ 
          
            m 
            , 
            _ 
           
         
        ( 
        
          a 
          
            1 
           
         
        
          a 
          
            2 
           
         
        . 
        . 
        . 
        ) 
        = 
        
          χ 
          
            m 
            , 
            _ 
           
         
        ( 
        
          a 
          
            1 
           
         
        ) 
        
          χ 
          
            m 
            , 
            _ 
           
         
        ( 
        
          a 
          
            2 
           
         
        ) 
        . 
        . 
        . 
        = 
        
          χ 
          
            
              q 
              
                1 
               
             
            , 
            _ 
           
         
        ( 
        
          a 
          
            1 
           
         
        ) 
        
          χ 
          
            
              q 
              
                2 
               
             
            , 
            _ 
           
         
        ( 
        
          a 
          
            2 
           
         
        ) 
        . 
        . 
        . 
        , 
       
     
    {\displaystyle \chi _{m,\_}(a)=\chi _{m,\_}(a_{1}a_{2}...)=\chi _{m,\_}(a_{1})\chi _{m,\_}(a_{2})...=\chi _{q_{1},\_}(a_{1})\chi _{q_{2},\_}(a_{2})...,} 
   
  
showing that every character mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   is the product of characters mod the 
  
    
      
        
          q 
          
            i 
           
         
       
     
    {\displaystyle q_{i}} 
   
  . 
For 
  
    
      
        ( 
        t 
        , 
        m 
        ) 
        = 
        1 
       
     
    {\displaystyle (t,m)=1} 
   
   define[ 21]  
  
    
      
        
          χ 
          
            m 
            , 
            t 
           
         
        = 
        
          χ 
          
            
              q 
              
                1 
               
             
            , 
            t 
           
         
        
          χ 
          
            
              q 
              
                2 
               
             
            , 
            t 
           
         
        . 
        . 
        . 
       
     
    {\displaystyle \chi _{m,t}=\chi _{q_{1},t}\chi _{q_{2},t}...} 
   
  
Then for 
  
    
      
        ( 
        r 
        s 
        , 
        m 
        ) 
        = 
        1 
       
     
    {\displaystyle (rs,m)=1} 
   
   and all 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
   and 
  
    
      
        b 
       
     
    {\displaystyle b} 
   
 [ 22]  
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        a 
        ) 
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        b 
        ) 
        = 
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        a 
        b 
        ) 
        , 
       
     
    {\displaystyle \chi _{m,r}(a)\chi _{m,r}(b)=\chi _{m,r}(ab),} 
   
   showing that 
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
       
     
    {\displaystyle \chi _{m,r}} 
   
   is a character and 
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        a 
        ) 
        
          χ 
          
            m 
            , 
            s 
           
         
        ( 
        a 
        ) 
        = 
        
          χ 
          
            m 
            , 
            r 
            s 
           
         
        ( 
        a 
        ) 
        , 
       
     
    {\displaystyle \chi _{m,r}(a)\chi _{m,s}(a)=\chi _{m,rs}(a),} 
   
   showing an isomorphism 
  
    
      
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                m 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle {\widehat {(\mathbb {Z} /m\mathbb {Z} )^{\times }}}\cong (\mathbb {Z} /m\mathbb {Z} )^{\times }.} 
   
  
 
 Examples m  = 15, 24, 40[ edit ]  
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        15 
        
          Z 
         
        
          ) 
          
            × 
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        3 
        
          Z 
         
        
          ) 
          
            × 
           
         
        × 
        ( 
        
          Z 
         
        
          / 
         
        5 
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle (\mathbb {Z} /15\mathbb {Z} )^{\times }\cong (\mathbb {Z} /3\mathbb {Z} )^{\times }\times (\mathbb {Z} /5\mathbb {Z} )^{\times }.} 
   
  
The factorization of the characters mod 15 is
  
    
      
        
          
            
              
                 
                
                  
                    χ 
                    
                      5 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      5 
                      , 
                      2 
                     
                   
                 
                
                  
                    χ 
                    
                      5 
                      , 
                      3 
                     
                   
                 
                
                  
                    χ 
                    
                      5 
                      , 
                      4 
                     
                   
                 
               
              
                
                  
                    χ 
                    
                      3 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      15 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      15 
                      , 
                      7 
                     
                   
                 
                
                  
                    χ 
                    
                      15 
                      , 
                      13 
                     
                   
                 
                
                  
                    χ 
                    
                      15 
                      , 
                      4 
                     
                   
                 
               
              
                
                  
                    χ 
                    
                      3 
                      , 
                      2 
                     
                   
                 
                
                  
                    χ 
                    
                      15 
                      , 
                      11 
                     
                   
                 
                
                  
                    χ 
                    
                      15 
                      , 
                      2 
                     
                   
                 
                
                  
                    χ 
                    
                      15 
                      , 
                      8 
                     
                   
                 
                
                  
                    χ 
                    
                      15 
                      , 
                      14 
                     
                   
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&\chi _{5,1}&\chi _{5,2}&\chi _{5,3}&\chi _{5,4}\\\hline \chi _{3,1}&\chi _{15,1}&\chi _{15,7}&\chi _{15,13}&\chi _{15,4}\\\chi _{3,2}&\chi _{15,11}&\chi _{15,2}&\chi _{15,8}&\chi _{15,14}\\\end{array}}} 
   
  
The nonzero values of the characters mod 15 are
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  2 
                 
                
                  4 
                 
                
                  7 
                 
                
                  8 
                 
                
                  11 
                 
                
                  13 
                 
                
                  14 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      2 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      4 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      7 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      8 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      11 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      13 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      14 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}&1&2&4&7&8&11&13&14\\\hline \chi _{15,1}&1&1&1&1&1&1&1&1\\\chi _{15,2}&1&-i&-1&i&i&-1&-i&1\\\chi _{15,4}&1&-1&1&-1&-1&1&-1&1\\\chi _{15,7}&1&i&-1&i&-i&1&-i&-1\\\chi _{15,8}&1&i&-1&-i&-i&-1&i&1\\\chi _{15,11}&1&-1&1&1&-1&-1&1&-1\\\chi _{15,13}&1&-i&-1&-i&i&1&i&-1\\\chi _{15,14}&1&1&1&-1&1&-1&-1&-1\\\end{array}}} 
   
  . 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        24 
        
          Z 
         
        
          ) 
          
            × 
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        8 
        
          Z 
         
        
          ) 
          
            × 
           
         
        × 
        ( 
        
          Z 
         
        
          / 
         
        3 
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle (\mathbb {Z} /24\mathbb {Z} )^{\times }\cong (\mathbb {Z} /8\mathbb {Z} )^{\times }\times (\mathbb {Z} /3\mathbb {Z} )^{\times }.} 
   
  
The factorization of the characters mod 24 is
  
    
      
        
          
            
              
                 
                
                  
                    χ 
                    
                      8 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      8 
                      , 
                      3 
                     
                   
                 
                
                  
                    χ 
                    
                      8 
                      , 
                      5 
                     
                   
                 
                
                  
                    χ 
                    
                      8 
                      , 
                      7 
                     
                   
                 
               
              
                
                  
                    χ 
                    
                      3 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      24 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      24 
                      , 
                      19 
                     
                   
                 
                
                  
                    χ 
                    
                      24 
                      , 
                      13 
                     
                   
                 
                
                  
                    χ 
                    
                      24 
                      , 
                      7 
                     
                   
                 
               
              
                
                  
                    χ 
                    
                      3 
                      , 
                      2 
                     
                   
                 
                
                  
                    χ 
                    
                      24 
                      , 
                      17 
                     
                   
                 
                
                  
                    χ 
                    
                      24 
                      , 
                      11 
                     
                   
                 
                
                  
                    χ 
                    
                      24 
                      , 
                      5 
                     
                   
                 
                
                  
                    χ 
                    
                      24 
                      , 
                      23 
                     
                   
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&\chi _{8,1}&\chi _{8,3}&\chi _{8,5}&\chi _{8,7}\\\hline \chi _{3,1}&\chi _{24,1}&\chi _{24,19}&\chi _{24,13}&\chi _{24,7}\\\chi _{3,2}&\chi _{24,17}&\chi _{24,11}&\chi _{24,5}&\chi _{24,23}\\\end{array}}} 
   
  
The nonzero values of the characters mod 24 are
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  5 
                 
                
                  7 
                 
                
                  11 
                 
                
                  13 
                 
                
                  17 
                 
                
                  19 
                 
                
                  23 
                 
               
              
                
                  
                    χ 
                    
                      24 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      24 
                      , 
                      5 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      24 
                      , 
                      7 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      24 
                      , 
                      11 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      24 
                      , 
                      13 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      24 
                      , 
                      17 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      24 
                      , 
                      19 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      24 
                      , 
                      23 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}&1&5&7&11&13&17&19&23\\\hline \chi _{24,1}&1&1&1&1&1&1&1&1\\\chi _{24,5}&1&1&1&1&-1&-1&-1&-1\\\chi _{24,7}&1&1&-1&-1&1&1&-1&-1\\\chi _{24,11}&1&1&-1&-1&-1&-1&1&1\\\chi _{24,13}&1&-1&1&-1&-1&1&-1&1\\\chi _{24,17}&1&-1&1&-1&1&-1&1&-1\\\chi _{24,19}&1&-1&-1&1&-1&1&1&-1\\\chi _{24,23}&1&-1&-1&1&1&-1&-1&1\\\end{array}}} 
   
  . 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        40 
        
          Z 
         
        
          ) 
          
            × 
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        8 
        
          Z 
         
        
          ) 
          
            × 
           
         
        × 
        ( 
        
          Z 
         
        
          / 
         
        5 
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle (\mathbb {Z} /40\mathbb {Z} )^{\times }\cong (\mathbb {Z} /8\mathbb {Z} )^{\times }\times (\mathbb {Z} /5\mathbb {Z} )^{\times }.} 
   
  
The factorization of the characters mod 40 is
  
    
      
        
          
            
              
                 
                
                  
                    χ 
                    
                      8 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      8 
                      , 
                      3 
                     
                   
                 
                
                  
                    χ 
                    
                      8 
                      , 
                      5 
                     
                   
                 
                
                  
                    χ 
                    
                      8 
                      , 
                      7 
                     
                   
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      1 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      11 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      21 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      31 
                     
                   
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      2 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      17 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      27 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      37 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      7 
                     
                   
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      3 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      33 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      3 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      13 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      23 
                     
                   
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      4 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      9 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      19 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      29 
                     
                   
                 
                
                  
                    χ 
                    
                      40 
                      , 
                      39 
                     
                   
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&\chi _{8,1}&\chi _{8,3}&\chi _{8,5}&\chi _{8,7}\\\hline \chi _{5,1}&\chi _{40,1}&\chi _{40,11}&\chi _{40,21}&\chi _{40,31}\\\chi _{5,2}&\chi _{40,17}&\chi _{40,27}&\chi _{40,37}&\chi _{40,7}\\\chi _{5,3}&\chi _{40,33}&\chi _{40,3}&\chi _{40,13}&\chi _{40,23}\\\chi _{5,4}&\chi _{40,9}&\chi _{40,19}&\chi _{40,29}&\chi _{40,39}\\\end{array}}} 
   
  
The nonzero values of the characters mod 40 are
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  3 
                 
                
                  7 
                 
                
                  9 
                 
                
                  11 
                 
                
                  13 
                 
                
                  17 
                 
                
                  19 
                 
                
                  21 
                 
                
                  23 
                 
                
                  27 
                 
                
                  29 
                 
                
                  31 
                 
                
                  33 
                 
                
                  37 
                 
                
                  39 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      1 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      3 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      7 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  1 
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      9 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      11 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      13 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  1 
                 
                
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      17 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      19 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      21 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      23 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      27 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      29 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      31 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      33 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      37 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      40 
                      , 
                      39 
                     
                   
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}&1&3&7&9&11&13&17&19&21&23&27&29&31&33&37&39\\\hline \chi _{40,1}&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\\chi _{40,3}&1&i&i&-1&1&-i&-i&-1&-1&-i&-i&1&-1&i&i&1\\\chi _{40,7}&1&i&-i&-1&-1&-i&i&1&1&i&-i&-1&-1&-i&i&1\\\chi _{40,9}&1&-1&-1&1&1&-1&-1&1&1&-1&-1&1&1&-1&-1&1\\\chi _{40,11}&1&1&-1&1&1&-1&1&1&-1&-1&1&-1&-1&1&-1&-1\\\chi _{40,13}&1&-i&-i&-1&-1&-i&-i&1&-1&i&i&1&1&i&i&-1\\\chi _{40,17}&1&-i&i&-1&1&-i&i&-1&1&-i&i&-1&1&-i&i&-1\\\chi _{40,19}&1&-1&1&1&1&1&-1&1&-1&1&-1&-1&-1&-1&1&-1\\\chi _{40,21}&1&-1&1&1&-1&-1&1&-1&-1&1&-1&-1&1&1&-1&1\\\chi _{40,23}&1&-i&i&-1&-1&i&-i&1&1&-i&i&-1&-1&i&-i&1\\\chi _{40,27}&1&-i&-i&-1&1&i&i&-1&-1&i&i&1&-1&-i&-i&1\\\chi _{40,29}&1&1&-1&1&-1&1&-1&-1&-1&-1&1&-1&1&-1&1&1\\\chi _{40,31}&1&-1&-1&1&-1&1&1&-1&1&-1&-1&1&-1&1&1&-1\\\chi _{40,33}&1&i&-i&-1&1&i&-i&-1&1&i&-i&-1&1&i&-i&-1\\\chi _{40,37}&1&i&i&-1&-1&i&i&1&-1&-i&-i&1&1&-i&-i&-1\\\chi _{40,39}&1&1&1&1&-1&-1&-1&-1&1&1&1&1&-1&-1&-1&-1\\\end{array}}} 
   
  . 
Let 
  
    
      
        m 
        = 
        
          p 
          
            1 
           
          
            
              k 
              
                1 
               
             
           
         
        
          p 
          
            2 
           
          
            
              k 
              
                2 
               
             
           
         
        ⋯ 
        = 
        
          q 
          
            1 
           
         
        
          q 
          
            2 
           
         
        ⋯ 
       
     
    {\displaystyle m=p_{1}^{k_{1}}p_{2}^{k_{2}}\cdots =q_{1}q_{2}\cdots } 
   
  , 
  
    
      
        
          p 
          
            1 
           
         
        < 
        
          p 
          
            2 
           
         
        < 
        … 
       
     
    {\displaystyle p_{1}<p_{2}<\dots } 
   
   be the factorization of 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   and assume 
  
    
      
        ( 
        r 
        s 
        , 
        m 
        ) 
        = 
        1. 
       
     
    {\displaystyle (rs,m)=1.} 
   
  
There are 
  
    
      
        ϕ 
        ( 
        m 
        ) 
       
     
    {\displaystyle \phi (m)} 
   
   Dirichlet characters mod 
  
    
      
        m 
        . 
       
     
    {\displaystyle m.} 
   
   They are denoted by 
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        , 
       
     
    {\displaystyle \chi _{m,r},} 
   
   where 
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        = 
        
          χ 
          
            m 
            , 
            s 
           
         
       
     
    {\displaystyle \chi _{m,r}=\chi _{m,s}} 
   
   is equivalent to 
  
    
      
        r 
        ≡ 
        s 
        
           
          ( 
          mod 
           
          m 
          ) 
         
        . 
       
     
    {\displaystyle r\equiv s{\pmod {m}}.} 
   
  
The identity 
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        a 
        ) 
        
          χ 
          
            m 
            , 
            s 
           
         
        ( 
        a 
        ) 
        = 
        
          χ 
          
            m 
            , 
            r 
            s 
           
         
        ( 
        a 
        ) 
         
       
     
    {\displaystyle \chi _{m,r}(a)\chi _{m,s}(a)=\chi _{m,rs}(a)\;} 
   
   is an isomorphism 
  
    
      
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                m 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle {\widehat {(\mathbb {Z} /m\mathbb {Z} )^{\times }}}\cong (\mathbb {Z} /m\mathbb {Z} )^{\times }.} 
   
 [ 23]  
Each character mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   has a unique factorization as the product of characters mod the prime powers dividing 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
  :
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        = 
        
          χ 
          
            
              q 
              
                1 
               
             
            , 
            r 
           
         
        
          χ 
          
            
              q 
              
                2 
               
             
            , 
            r 
           
         
        . 
        . 
        . 
       
     
    {\displaystyle \chi _{m,r}=\chi _{q_{1},r}\chi _{q_{2},r}...} 
   
  
If 
  
    
      
        m 
        = 
        
          m 
          
            1 
           
         
        
          m 
          
            2 
           
         
        , 
        ( 
        
          m 
          
            1 
           
         
        , 
        
          m 
          
            2 
           
         
        ) 
        = 
        1 
       
     
    {\displaystyle m=m_{1}m_{2},(m_{1},m_{2})=1} 
   
   the product 
  
    
      
        
          χ 
          
            
              m 
              
                1 
               
             
            , 
            r 
           
         
        
          χ 
          
            
              m 
              
                2 
               
             
            , 
            s 
           
         
       
     
    {\displaystyle \chi _{m_{1},r}\chi _{m_{2},s}} 
   
   is a character 
  
    
      
        
          χ 
          
            m 
            , 
            t 
           
         
       
     
    {\displaystyle \chi _{m,t}} 
   
   where 
  
    
      
        t 
       
     
    {\displaystyle t} 
   
   is given by 
  
    
      
        t 
        ≡ 
        r 
        
           
          ( 
          mod 
           
          
            m 
            
              1 
             
           
          ) 
         
       
     
    {\displaystyle t\equiv r{\pmod {m_{1}}}} 
   
   and 
  
    
      
        t 
        ≡ 
        s 
        
           
          ( 
          mod 
           
          
            m 
            
              2 
             
           
          ) 
         
        . 
       
     
    {\displaystyle t\equiv s{\pmod {m_{2}}}.} 
   
  
Also,[ 24] [ 25]  
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        s 
        ) 
        = 
        
          χ 
          
            m 
            , 
            s 
           
         
        ( 
        r 
        ) 
       
     
    {\displaystyle \chi _{m,r}(s)=\chi _{m,s}(r)} 
   
  
The two orthogonality relations are[ 26]  
  
    
      
        
          ∑ 
          
            a 
            ∈ 
            ( 
            
              Z 
             
            
              / 
             
            m 
            
              Z 
             
            
              ) 
              
                × 
               
             
           
         
        χ 
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  ϕ 
                  ( 
                  m 
                  ) 
                 
                
                  
                     if  
                   
                   
                  χ 
                  = 
                  
                    χ 
                    
                      0 
                     
                   
                 
               
              
                
                  0 
                 
                
                  
                     if  
                   
                   
                  χ 
                  ≠ 
                  
                    χ 
                    
                      0 
                     
                   
                 
               
             
             
           
         
       
     
    {\displaystyle \sum _{a\in (\mathbb {Z} /m\mathbb {Z} )^{\times }}\chi (a)={\begin{cases}\phi (m)&{\text{ if  }}\;\chi =\chi _{0}\\0&{\text{ if  }}\;\chi \neq \chi _{0}\end{cases}}} 
   
       and      
  
    
      
        
          ∑ 
          
            χ 
            ∈ 
            
              
                
                  
                    ( 
                    
                      Z 
                     
                    
                      / 
                     
                    m 
                    
                      Z 
                     
                    
                      ) 
                      
                        × 
                       
                     
                   
                  ^ 
                 
               
             
           
         
        χ 
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  ϕ 
                  ( 
                  m 
                  ) 
                 
                
                  
                     if  
                   
                   
                  a 
                  ≡ 
                  1 
                  
                     
                    ( 
                    mod 
                     
                    m 
                    ) 
                   
                 
               
              
                
                  0 
                 
                
                  
                     if  
                   
                   
                  a 
                  ≢ 
                  1 
                  
                     
                    ( 
                    mod 
                     
                    m 
                    ) 
                   
                  . 
                 
               
             
             
           
         
       
     
    {\displaystyle \sum _{\chi \in {\widehat {(\mathbb {Z} /m\mathbb {Z} )^{\times }}}}\chi (a)={\begin{cases}\phi (m)&{\text{ if  }}\;a\equiv 1{\pmod {m}}\\0&{\text{ if  }}\;a\not \equiv 1{\pmod {m}}.\end{cases}}} 
   
  
The relations can  be written in the symmetric form
  
    
      
        
          ∑ 
          
            a 
            ∈ 
            ( 
            
              Z 
             
            
              / 
             
            m 
            
              Z 
             
            
              ) 
              
                × 
               
             
           
         
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  ϕ 
                  ( 
                  m 
                  ) 
                 
                
                  
                     if  
                   
                   
                  r 
                  ≡ 
                  1 
                 
               
              
                
                  0 
                 
                
                  
                     if  
                   
                   
                  r 
                  ≢ 
                  1 
                 
               
             
             
           
         
       
     
    {\displaystyle \sum _{a\in (\mathbb {Z} /m\mathbb {Z} )^{\times }}\chi _{m,r}(a)={\begin{cases}\phi (m)&{\text{ if  }}\;r\equiv 1\\0&{\text{ if  }}\;r\not \equiv 1\end{cases}}} 
   
       and      
  
    
      
        
          ∑ 
          
            r 
            ∈ 
            ( 
            
              Z 
             
            
              / 
             
            m 
            
              Z 
             
            
              ) 
              
                × 
               
             
           
         
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  ϕ 
                  ( 
                  m 
                  ) 
                 
                
                  
                     if  
                   
                   
                  a 
                  ≡ 
                  1 
                 
               
              
                
                  0 
                 
                
                  
                     if  
                   
                   
                  a 
                  ≢ 
                  1. 
                 
               
             
             
           
         
       
     
    {\displaystyle \sum _{r\in (\mathbb {Z} /m\mathbb {Z} )^{\times }}\chi _{m,r}(a)={\begin{cases}\phi (m)&{\text{ if  }}\;a\equiv 1\\0&{\text{ if  }}\;a\not \equiv 1.\end{cases}}} 
   
  
The first relation is easy to prove: If 
  
    
      
        χ 
        = 
        
          χ 
          
            0 
           
         
       
     
    {\displaystyle \chi =\chi _{0}} 
   
   there are 
  
    
      
        ϕ 
        ( 
        m 
        ) 
       
     
    {\displaystyle \phi (m)} 
   
   non-zero summands each equal to 1. If 
  
    
      
        χ 
        ≠ 
        
          χ 
          
            0 
           
         
       
     
    {\displaystyle \chi \neq \chi _{0}} 
   
  there is[ 27]    some 
  
    
      
        
          a 
          
            ∗ 
           
         
        , 
         
        ( 
        
          a 
          
            ∗ 
           
         
        , 
        m 
        ) 
        = 
        1 
        , 
         
        χ 
        ( 
        
          a 
          
            ∗ 
           
         
        ) 
        ≠ 
        1. 
       
     
    {\displaystyle a^{*},\;(a^{*},m)=1,\;\chi (a^{*})\neq 1.} 
   
    Then
  
    
      
        χ 
        ( 
        
          a 
          
            ∗ 
           
         
        ) 
        
          ∑ 
          
            a 
            ∈ 
            ( 
            
              Z 
             
            
              / 
             
            m 
            
              Z 
             
            
              ) 
              
                × 
               
             
           
         
        χ 
        ( 
        a 
        ) 
        = 
        
          ∑ 
          
            a 
           
         
        χ 
        ( 
        
          a 
          
            ∗ 
           
         
        ) 
        χ 
        ( 
        a 
        ) 
        = 
        
          ∑ 
          
            a 
           
         
        χ 
        ( 
        
          a 
          
            ∗ 
           
         
        a 
        ) 
        = 
        
          ∑ 
          
            a 
           
         
        χ 
        ( 
        a 
        ) 
        , 
       
     
    {\displaystyle \chi (a^{*})\sum _{a\in (\mathbb {Z} /m\mathbb {Z} )^{\times }}\chi (a)=\sum _{a}\chi (a^{*})\chi (a)=\sum _{a}\chi (a^{*}a)=\sum _{a}\chi (a),} 
   
 [ 28]     implying 
  
    
      
        ( 
        χ 
        ( 
        
          a 
          
            ∗ 
           
         
        ) 
        − 
        1 
        ) 
        
          ∑ 
          
            a 
           
         
        χ 
        ( 
        a 
        ) 
        = 
        0. 
       
     
    {\displaystyle (\chi (a^{*})-1)\sum _{a}\chi (a)=0.} 
   
     Dividing by the first factor gives 
  
    
      
        
          ∑ 
          
            a 
           
         
        χ 
        ( 
        a 
        ) 
        = 
        0 
        , 
       
     
    {\displaystyle \sum _{a}\chi (a)=0,} 
   
   QED. The identity 
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        ( 
        s 
        ) 
        = 
        
          χ 
          
            m 
            , 
            s 
           
         
        ( 
        r 
        ) 
       
     
    {\displaystyle \chi _{m,r}(s)=\chi _{m,s}(r)} 
   
   for 
  
    
      
        ( 
        r 
        s 
        , 
        m 
        ) 
        = 
        1 
       
     
    {\displaystyle (rs,m)=1} 
   
   shows that the relations are equivalent to each other. 
The second relation can be proven directly in the same way, but requires a lemma[ 29]  
Given 
  
    
      
        a 
        ≢ 
        1 
        
           
          ( 
          mod 
           
          m 
          ) 
         
        , 
         
        ( 
        a 
        , 
        m 
        ) 
        = 
        1 
        , 
       
     
    {\displaystyle a\not \equiv 1{\pmod {m}},\;(a,m)=1,} 
   
   there is a 
  
    
      
        
          χ 
          
            ∗ 
           
         
        , 
         
        
          χ 
          
            ∗ 
           
         
        ( 
        a 
        ) 
        ≠ 
        1. 
       
     
    {\displaystyle \chi ^{*},\;\chi ^{*}(a)\neq 1.} 
   
   
The second relation has an important corollary: if 
  
    
      
        ( 
        a 
        , 
        m 
        ) 
        = 
        1 
        , 
       
     
    {\displaystyle (a,m)=1,} 
   
   define the function
  
    
      
        
          f 
          
            a 
           
         
        ( 
        n 
        ) 
        = 
        
          
            1 
            
              ϕ 
              ( 
              m 
              ) 
             
           
         
        
          ∑ 
          
            χ 
           
         
        
          
            
              χ 
              ¯ 
             
           
         
        ( 
        a 
        ) 
        χ 
        ( 
        n 
        ) 
        . 
       
     
    {\displaystyle f_{a}(n)={\frac {1}{\phi (m)}}\sum _{\chi }{\bar {\chi }}(a)\chi (n).} 
   
     Then 
  
    
      
        
          f 
          
            a 
           
         
        ( 
        n 
        ) 
        = 
        
          
            1 
            
              ϕ 
              ( 
              m 
              ) 
             
           
         
        
          ∑ 
          
            χ 
           
         
        χ 
        ( 
        
          a 
          
            − 
            1 
           
         
        ) 
        χ 
        ( 
        n 
        ) 
        = 
        
          
            1 
            
              ϕ 
              ( 
              m 
              ) 
             
           
         
        
          ∑ 
          
            χ 
           
         
        χ 
        ( 
        
          a 
          
            − 
            1 
           
         
        n 
        ) 
        = 
        
          
            { 
            
              
                
                  1 
                  , 
                 
                
                  n 
                  ≡ 
                  a 
                  
                     
                    ( 
                    mod 
                     
                    m 
                    ) 
                   
                 
               
              
                
                  0 
                  , 
                 
                
                  n 
                  ≢ 
                  a 
                  
                     
                    ( 
                    mod 
                     
                    m 
                    ) 
                   
                  , 
                 
               
             
             
           
         
       
     
    {\displaystyle f_{a}(n)={\frac {1}{\phi (m)}}\sum _{\chi }\chi (a^{-1})\chi (n)={\frac {1}{\phi (m)}}\sum _{\chi }\chi (a^{-1}n)={\begin{cases}1,&n\equiv a{\pmod {m}}\\0,&n\not \equiv a{\pmod {m}},\end{cases}}} 
   
  
That is 
  
    
      
        
          f 
          
            a 
           
         
        = 
        
          
            1 
           
          
            [ 
            a 
            ] 
           
         
       
     
    {\displaystyle f_{a}=\mathbb {1} _{[a]}} 
   
   the indicator function  of the residue class 
  
    
      
        [ 
        a 
        ] 
        = 
        { 
        x 
        : 
         
        x 
        ≡ 
        a 
        
           
          ( 
          mod 
           
          m 
          ) 
         
        } 
       
     
    {\displaystyle [a]=\{x:\;x\equiv a{\pmod {m}}\}} 
   
  . It is basic in the proof of Dirichlet's theorem.[ 30] [ 31]  
Classification of characters [ edit ]  
 Conductor; Primitive and induced characters[ edit ]  
Any character mod a prime power is also a character mod every larger power. For example, mod 16[ 32]  
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  3 
                 
                
                  5 
                 
                
                  7 
                 
                
                  9 
                 
                
                  11 
                 
                
                  13 
                 
                
                  15 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      3 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      9 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
               
              
                
                  
                    χ 
                    
                      16 
                      , 
                      15 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}&1&3&5&7&9&11&13&15\\\hline \chi _{16,3}&1&-i&-i&1&-1&i&i&-1\\\chi _{16,9}&1&-1&-1&1&1&-1&-1&1\\\chi _{16,15}&1&-1&1&-1&1&-1&1&-1\\\end{array}}} 
   
  
  
    
      
        
          χ 
          
            16 
            , 
            3 
           
         
       
     
    {\displaystyle \chi _{16,3}} 
   
   has period 16, but 
  
    
      
        
          χ 
          
            16 
            , 
            9 
           
         
       
     
    {\displaystyle \chi _{16,9}} 
   
   has period 8 and 
  
    
      
        
          χ 
          
            16 
            , 
            15 
           
         
       
     
    {\displaystyle \chi _{16,15}} 
   
   has period 4:   
  
    
      
        
          χ 
          
            16 
            , 
            9 
           
         
        = 
        
          χ 
          
            8 
            , 
            5 
           
         
       
     
    {\displaystyle \chi _{16,9}=\chi _{8,5}} 
   
   and  
  
    
      
        
          χ 
          
            16 
            , 
            15 
           
         
        = 
        
          χ 
          
            8 
            , 
            7 
           
         
        = 
        
          χ 
          
            4 
            , 
            3 
           
         
        . 
       
     
    {\displaystyle \chi _{16,15}=\chi _{8,7}=\chi _{4,3}.} 
   
  
We say that a character 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   of modulus 
  
    
      
        q 
       
     
    {\displaystyle q} 
   
   has a quasiperiod of 
  
    
      
        d 
       
     
    {\displaystyle d} 
   
   if 
  
    
      
        χ 
        ( 
        m 
        ) 
        = 
        χ 
        ( 
        n 
        ) 
       
     
    {\displaystyle \chi (m)=\chi (n)} 
   
   for all 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
  , 
  
    
      
        n 
       
     
    {\displaystyle n} 
   
   coprime to 
  
    
      
        q 
       
     
    {\displaystyle q} 
   
   satisfying 
  
    
      
        m 
        ≡ 
        n 
       
     
    {\displaystyle m\equiv n} 
   
   mod 
  
    
      
        d 
       
     
    {\displaystyle d} 
   
  .[ 33]   For example, 
  
    
      
        
          χ 
          
            2 
            , 
            1 
           
         
       
     
    {\displaystyle \chi _{2,1}} 
   
  , the only Dirichlet character of modulus 
  
    
      
        2 
       
     
    {\displaystyle 2} 
   
  , has a quasiperiod of 
  
    
      
        1 
       
     
    {\displaystyle 1} 
   
  , but not  a period of 
  
    
      
        1 
       
     
    {\displaystyle 1} 
   
   (it has a period of 
  
    
      
        2 
       
     
    {\displaystyle 2} 
   
  , though). The smallest positive integer for which 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   is quasiperiodic is  the conductor  of 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
  .[ 34]   So, for instance, 
  
    
      
        
          χ 
          
            2 
            , 
            1 
           
         
       
     
    {\displaystyle \chi _{2,1}} 
   
   has a conductor of 
  
    
      
        1 
       
     
    {\displaystyle 1} 
   
  .
The conductor of 
  
    
      
        
          χ 
          
            16 
            , 
            3 
           
         
       
     
    {\displaystyle \chi _{16,3}} 
   
   is 16, the conductor of 
  
    
      
        
          χ 
          
            16 
            , 
            9 
           
         
       
     
    {\displaystyle \chi _{16,9}} 
   
   is 8 and that of  
  
    
      
        
          χ 
          
            16 
            , 
            15 
           
         
       
     
    {\displaystyle \chi _{16,15}} 
   
   and 
  
    
      
        
          χ 
          
            8 
            , 
            7 
           
         
       
     
    {\displaystyle \chi _{8,7}} 
   
   is 4. If the modulus and conductor are equal the character is primitive , otherwise imprimitive . An imprimitive character is induced  by the character for the smallest modulus: 
  
    
      
        
          χ 
          
            16 
            , 
            9 
           
         
       
     
    {\displaystyle \chi _{16,9}} 
   
   is induced from 
  
    
      
        
          χ 
          
            8 
            , 
            5 
           
         
       
     
    {\displaystyle \chi _{8,5}} 
   
   and 
  
    
      
        
          χ 
          
            16 
            , 
            15 
           
         
       
     
    {\displaystyle \chi _{16,15}} 
   
   and 
  
    
      
        
          χ 
          
            8 
            , 
            7 
           
         
       
     
    {\displaystyle \chi _{8,7}} 
   
   are induced from 
  
    
      
        
          χ 
          
            4 
            , 
            3 
           
         
       
     
    {\displaystyle \chi _{4,3}} 
   
  .
A related phenomenon can happen with a character mod the product of primes; its nonzero values  may be periodic with a smaller period.
For example, mod 15,
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  2 
                 
                
                  3 
                 
                
                  4 
                 
                
                  5 
                 
                
                  6 
                 
                
                  7 
                 
                
                  8 
                 
                
                  9 
                 
                
                  10 
                 
                
                  11 
                 
                
                  12 
                 
                
                  13 
                 
                
                  14 
                 
                
                  15 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      8 
                     
                   
                 
                
                  1 
                 
                
                  i 
                 
                
                  0 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  0 
                 
                
                  − 
                  i 
                 
                
                  − 
                  i 
                 
                
                  0 
                 
                
                  0 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  i 
                 
                
                  1 
                 
                
                  0 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      11 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  0 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  0 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      13 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  0 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  0 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  0 
                 
                
                  0 
                 
                
                  1 
                 
                
                  0 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15\\\hline \chi _{15,8}&1&i&0&-1&0&0&-i&-i&0&0&-1&0&i&1&0\\\chi _{15,11}&1&-1&0&1&0&0&1&-1&0&0&-1&0&1&-1&0\\\chi _{15,13}&1&-i&0&-1&0&0&-i&i&0&0&1&0&i&-1&0\\\end{array}}} 
   
  . 
The nonzero values of 
  
    
      
        
          χ 
          
            15 
            , 
            8 
           
         
       
     
    {\displaystyle \chi _{15,8}} 
   
   have period 15, but those of 
  
    
      
        
          χ 
          
            15 
            , 
            11 
           
         
       
     
    {\displaystyle \chi _{15,11}} 
   
   have period 3 and those of 
  
    
      
        
          χ 
          
            15 
            , 
            13 
           
         
       
     
    {\displaystyle \chi _{15,13}} 
   
   have period 5. This is easier to see by juxtaposing them with characters mod 3 and 5:
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  2 
                 
                
                  3 
                 
                
                  4 
                 
                
                  5 
                 
                
                  6 
                 
                
                  7 
                 
                
                  8 
                 
                
                  9 
                 
                
                  10 
                 
                
                  11 
                 
                
                  12 
                 
                
                  13 
                 
                
                  14 
                 
                
                  15 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      11 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  0 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  0 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
               
              
                
                  
                    χ 
                    
                      3 
                      , 
                      2 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
               
              
                
                  
                    χ 
                    
                      15 
                      , 
                      13 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  0 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  0 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  0 
                 
                
                  0 
                 
                
                  1 
                 
                
                  0 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
               
              
                
                  
                    χ 
                    
                      5 
                      , 
                      3 
                     
                   
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
                
                  1 
                 
                
                  − 
                  i 
                 
                
                  i 
                 
                
                  − 
                  1 
                 
                
                  0 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|||}&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15\\\hline \chi _{15,11}&1&-1&0&1&0&0&1&-1&0&0&-1&0&1&-1&0\\\chi _{3,2}&1&-1&0&1&-1&0&1&-1&0&1&-1&0&1&-1&0\\\hline \chi _{15,13}&1&-i&0&-1&0&0&-i&i&0&0&1&0&i&-1&0\\\chi _{5,3}&1&-i&i&-1&0&1&-i&i&-1&0&1&-i&i&-1&0\\\end{array}}} 
   
  . 
If a character mod 
  
    
      
        m 
        = 
        q 
        r 
        , 
         
         
        ( 
        q 
        , 
        r 
        ) 
        = 
        1 
        , 
         
         
        q 
        > 
        1 
        , 
         
         
        r 
        > 
        1 
       
     
    {\displaystyle m=qr,\;\;(q,r)=1,\;\;q>1,\;\;r>1} 
   
    is defined as
  
    
      
        
          χ 
          
            m 
            , 
            _ 
           
         
        ( 
        a 
        ) 
        = 
        
          
            { 
            
              
                
                  0 
                 
                
                  
                     if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  > 
                  1 
                 
               
              
                
                  
                    χ 
                    
                      q 
                      , 
                      _ 
                     
                   
                  ( 
                  a 
                  ) 
                 
                
                  
                     if  
                   
                  gcd 
                  ( 
                  a 
                  , 
                  m 
                  ) 
                  = 
                  1 
                 
               
             
             
           
         
       
     
    {\displaystyle \chi _{m,\_}(a)={\begin{cases}0&{\text{ if  }}\gcd(a,m)>1\\\chi _{q,\_}(a)&{\text{ if  }}\gcd(a,m)=1\end{cases}}} 
   
  ,   or equivalently as 
  
    
      
        
          χ 
          
            m 
            , 
            _ 
           
         
        = 
        
          χ 
          
            q 
            , 
            _ 
           
         
        
          χ 
          
            r 
            , 
            1 
           
         
        , 
       
     
    {\displaystyle \chi _{m,\_}=\chi _{q,\_}\chi _{r,1},} 
   
  
its nonzero values are determined by the character mod 
  
    
      
        q 
       
     
    {\displaystyle q} 
   
   and have period 
  
    
      
        q 
       
     
    {\displaystyle q} 
   
  .
The smallest period of the nonzero values is the conductor  of the character. For example, the conductor of 
  
    
      
        
          χ 
          
            15 
            , 
            8 
           
         
       
     
    {\displaystyle \chi _{15,8}} 
   
   is 15, the conductor of 
  
    
      
        
          χ 
          
            15 
            , 
            11 
           
         
       
     
    {\displaystyle \chi _{15,11}} 
   
   is 3, and that of 
  
    
      
        
          χ 
          
            15 
            , 
            13 
           
         
       
     
    {\displaystyle \chi _{15,13}} 
   
   is 5.
As in the prime-power case, if the conductor equals the modulus the character is primitive , otherwise imprimitive . If imprimitive it is induced  from the character with the smaller modulus. For example, 
  
    
      
        
          χ 
          
            15 
            , 
            11 
           
         
       
     
    {\displaystyle \chi _{15,11}} 
   
   is induced from 
  
    
      
        
          χ 
          
            3 
            , 
            2 
           
         
       
     
    {\displaystyle \chi _{3,2}} 
   
   and 
  
    
      
        
          χ 
          
            15 
            , 
            13 
           
         
       
     
    {\displaystyle \chi _{15,13}} 
   
   is induced from 
  
    
      
        
          χ 
          
            5 
            , 
            3 
           
         
       
     
    {\displaystyle \chi _{5,3}} 
   
  
The principal character is not primitive.[ 35]  
The character 
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
        = 
        
          χ 
          
            
              q 
              
                1 
               
             
            , 
            r 
           
         
        
          χ 
          
            
              q 
              
                2 
               
             
            , 
            r 
           
         
        . 
        . 
        . 
       
     
    {\displaystyle \chi _{m,r}=\chi _{q_{1},r}\chi _{q_{2},r}...} 
   
   is primitive if and only if each of the factors is primitive.[ 36]  
Primitive characters often simplify (or make possible) formulas in the theories of L-functions [ 37]   and modular forms .
  
    
      
        χ 
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi (a)} 
   
   is even  if 
  
    
      
        χ 
        ( 
        − 
        1 
        ) 
        = 
        1 
       
     
    {\displaystyle \chi (-1)=1} 
   
    and is odd  if 
  
    
      
        χ 
        ( 
        − 
        1 
        ) 
        = 
        − 
        1. 
       
     
    {\displaystyle \chi (-1)=-1.} 
   
  
This distinction appears in the functional equation  of the Dirichlet L-function .
The order  of a character is its order as an element of the group  
  
    
      
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                m 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
       
     
    {\displaystyle {\widehat {(\mathbb {Z} /m\mathbb {Z} )^{\times }}}} 
   
  , i.e. the smallest positive integer 
  
    
      
        n 
       
     
    {\displaystyle n} 
   
   such that 
  
    
      
        
          χ 
          
            n 
           
         
        = 
        
          χ 
          
            0 
           
         
        . 
       
     
    {\displaystyle \chi ^{n}=\chi _{0}.} 
   
   Because of the isomorphism 
  
    
      
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                m 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
        ≅ 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle {\widehat {(\mathbb {Z} /m\mathbb {Z} )^{\times }}}\cong (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
   the order of 
  
    
      
        
          χ 
          
            m 
            , 
            r 
           
         
       
     
    {\displaystyle \chi _{m,r}} 
   
    is the same as the order of 
  
    
      
        r 
       
     
    {\displaystyle r} 
   
   in  
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
        . 
       
     
    {\displaystyle (\mathbb {Z} /m\mathbb {Z} )^{\times }.} 
   
   The principal character has order 1; other real characters  have order 2, and imaginary characters have order 3 or greater. By Lagrange's theorem  the order of a character divides the order of 
  
    
      
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                m 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
       
     
    {\displaystyle {\widehat {(\mathbb {Z} /m\mathbb {Z} )^{\times }}}} 
   
   which is 
  
    
      
        ϕ 
        ( 
        m 
        ) 
       
     
    {\displaystyle \phi (m)} 
   
  
  
    
      
        χ 
        ( 
        a 
        ) 
       
     
    {\displaystyle \chi (a)} 
   
   is real  or quadratic  if all of its values are real (they must be 
  
    
      
        0 
        , 
         
        ± 
        1 
       
     
    {\displaystyle 0,\;\pm 1} 
   
  ); otherwise it is complex  or imaginary. 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   is real if and only if  
  
    
      
        
          χ 
          
            2 
           
         
        = 
        
          χ 
          
            0 
           
         
       
     
    {\displaystyle \chi ^{2}=\chi _{0}} 
   
  ; 
  
    
      
        
          χ 
          
            m 
            , 
            k 
           
         
       
     
    {\displaystyle \chi _{m,k}} 
   
   is real if and only if 
  
    
      
        
          k 
          
            2 
           
         
        ≡ 
        1 
        
           
          ( 
          mod 
           
          m 
          ) 
         
       
     
    {\displaystyle k^{2}\equiv 1{\pmod {m}}} 
   
  ; in particular, 
  
    
      
        
          χ 
          
            m 
            , 
            − 
            1 
           
         
       
     
    {\displaystyle \chi _{m,-1}} 
   
   is real and non-principal.[ 38]  
Dirichlet's original proof that 
  
    
      
        L 
        ( 
        1 
        , 
        χ 
        ) 
        ≠ 
        0 
       
     
    {\displaystyle L(1,\chi )\neq 0} 
   
   (which was only valid for prime moduli) took two different forms depending on whether 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   was real or not. His later proof, valid for all moduli, was based on his class number formula .[ 39] [ 40]  
Real characters are Kronecker symbols ;[ 41]   for example, the principal character can be written[ 42]  
  
    
      
        
          χ 
          
            m 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                m 
                
                  2 
                 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{m,1}=\left({\frac {m^{2}}{\bullet }}\right)} 
   
  .
The real characters in the examples are:
If 
  
    
      
        m 
        = 
        
          p 
          
            1 
           
          
            
              k 
              
                1 
               
             
           
         
        
          p 
          
            2 
           
          
            
              k 
              
                2 
               
             
           
         
        . 
        . 
        . 
        , 
         
        
          p 
          
            1 
           
         
        < 
        
          p 
          
            2 
           
         
        < 
         
        . 
        . 
        . 
       
     
    {\displaystyle m=p_{1}^{k_{1}}p_{2}^{k_{2}}...,\;p_{1}<p_{2}<\;...} 
   
   the principal character is[ 43]   
  
    
      
        
          χ 
          
            m 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                
                  p 
                  
                    1 
                   
                  
                    2 
                   
                 
                
                  p 
                  
                    2 
                   
                  
                    2 
                   
                 
                . 
                . 
                . 
               
              ∙ 
             
           
          ) 
         
        . 
       
     
    {\displaystyle \chi _{m,1}=\left({\frac {p_{1}^{2}p_{2}^{2}...}{\bullet }}\right).} 
   
  
  
    
      
        
          χ 
          
            16 
            , 
            1 
           
         
        = 
        
          χ 
          
            8 
            , 
            1 
           
         
        = 
        
          χ 
          
            4 
            , 
            1 
           
         
        = 
        
          χ 
          
            2 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              4 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{16,1}=\chi _{8,1}=\chi _{4,1}=\chi _{2,1}=\left({\frac {4}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            9 
            , 
            1 
           
         
        = 
        
          χ 
          
            3 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              9 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{9,1}=\chi _{3,1}=\left({\frac {9}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            5 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              25 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{5,1}=\left({\frac {25}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            7 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              49 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{7,1}=\left({\frac {49}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            15 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              225 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{15,1}=\left({\frac {225}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            24 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              36 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{24,1}=\left({\frac {36}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            40 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              100 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{40,1}=\left({\frac {100}{\bullet }}\right)} 
   
    
If the modulus is the absolute value of a  fundamental discriminant  there is a real primitive character (there are two if the modulus is a multiple of 8); otherwise if there are any primitive characters[ 36]   they are imaginary.[ 44]  
  
    
      
        
          χ 
          
            3 
            , 
            2 
           
         
        = 
        
          ( 
          
            
              
                − 
                3 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{3,2}=\left({\frac {-3}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            4 
            , 
            3 
           
         
        = 
        
          ( 
          
            
              
                − 
                4 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{4,3}=\left({\frac {-4}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            5 
            , 
            4 
           
         
        = 
        
          ( 
          
            
              5 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{5,4}=\left({\frac {5}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            7 
            , 
            6 
           
         
        = 
        
          ( 
          
            
              
                − 
                7 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{7,6}=\left({\frac {-7}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            8 
            , 
            3 
           
         
        = 
        
          ( 
          
            
              
                − 
                8 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{8,3}=\left({\frac {-8}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            8 
            , 
            5 
           
         
        = 
        
          ( 
          
            
              8 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{8,5}=\left({\frac {8}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            15 
            , 
            14 
           
         
        = 
        
          ( 
          
            
              
                − 
                15 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{15,14}=\left({\frac {-15}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            24 
            , 
            5 
           
         
        = 
        
          ( 
          
            
              
                − 
                24 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{24,5}=\left({\frac {-24}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            24 
            , 
            11 
           
         
        = 
        
          ( 
          
            
              24 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{24,11}=\left({\frac {24}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            40 
            , 
            19 
           
         
        = 
        
          ( 
          
            
              
                − 
                40 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{40,19}=\left({\frac {-40}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            40 
            , 
            29 
           
         
        = 
        
          ( 
          
            
              40 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{40,29}=\left({\frac {40}{\bullet }}\right)} 
   
  
  
    
      
        
          χ 
          
            8 
            , 
            7 
           
         
        = 
        
          χ 
          
            4 
            , 
            3 
           
         
        = 
        
          ( 
          
            
              
                − 
                4 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{8,7}=\chi _{4,3}=\left({\frac {-4}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            9 
            , 
            8 
           
         
        = 
        
          χ 
          
            3 
            , 
            2 
           
         
        = 
        
          ( 
          
            
              
                − 
                3 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{9,8}=\chi _{3,2}=\left({\frac {-3}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            15 
            , 
            4 
           
         
        = 
        
          χ 
          
            5 
            , 
            4 
           
         
        
          χ 
          
            3 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              45 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{15,4}=\chi _{5,4}\chi _{3,1}=\left({\frac {45}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            15 
            , 
            11 
           
         
        = 
        
          χ 
          
            3 
            , 
            2 
           
         
        
          χ 
          
            5 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                − 
                75 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{15,11}=\chi _{3,2}\chi _{5,1}=\left({\frac {-75}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            16 
            , 
            7 
           
         
        = 
        
          χ 
          
            8 
            , 
            3 
           
         
        = 
        
          ( 
          
            
              
                − 
                8 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{16,7}=\chi _{8,3}=\left({\frac {-8}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            16 
            , 
            9 
           
         
        = 
        
          χ 
          
            8 
            , 
            5 
           
         
        = 
        
          ( 
          
            
              8 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{16,9}=\chi _{8,5}=\left({\frac {8}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            16 
            , 
            15 
           
         
        = 
        
          χ 
          
            4 
            , 
            3 
           
         
        = 
        
          ( 
          
            
              
                − 
                4 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{16,15}=\chi _{4,3}=\left({\frac {-4}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            24 
            , 
            7 
           
         
        = 
        
          χ 
          
            8 
            , 
            7 
           
         
        
          χ 
          
            3 
            , 
            1 
           
         
        = 
        
          χ 
          
            4 
            , 
            3 
           
         
        
          χ 
          
            3 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                − 
                36 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{24,7}=\chi _{8,7}\chi _{3,1}=\chi _{4,3}\chi _{3,1}=\left({\frac {-36}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            24 
            , 
            13 
           
         
        = 
        
          χ 
          
            8 
            , 
            5 
           
         
        
          χ 
          
            3 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              72 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{24,13}=\chi _{8,5}\chi _{3,1}=\left({\frac {72}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            24 
            , 
            17 
           
         
        = 
        
          χ 
          
            3 
            , 
            2 
           
         
        
          χ 
          
            8 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                − 
                12 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{24,17}=\chi _{3,2}\chi _{8,1}=\left({\frac {-12}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            24 
            , 
            19 
           
         
        = 
        
          χ 
          
            8 
            , 
            3 
           
         
        
          χ 
          
            3 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                − 
                72 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{24,19}=\chi _{8,3}\chi _{3,1}=\left({\frac {-72}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            24 
            , 
            23 
           
         
        = 
        
          χ 
          
            8 
            , 
            7 
           
         
        
          χ 
          
            3 
            , 
            2 
           
         
        = 
        
          χ 
          
            4 
            , 
            3 
           
         
        
          χ 
          
            3 
            , 
            2 
           
         
        = 
        
          ( 
          
            
              12 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{24,23}=\chi _{8,7}\chi _{3,2}=\chi _{4,3}\chi _{3,2}=\left({\frac {12}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            40 
            , 
            9 
           
         
        = 
        
          χ 
          
            5 
            , 
            4 
           
         
        
          χ 
          
            8 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              20 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{40,9}=\chi _{5,4}\chi _{8,1}=\left({\frac {20}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            40 
            , 
            11 
           
         
        = 
        
          χ 
          
            8 
            , 
            3 
           
         
        
          χ 
          
            5 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                − 
                200 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{40,11}=\chi _{8,3}\chi _{5,1}=\left({\frac {-200}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            40 
            , 
            21 
           
         
        = 
        
          χ 
          
            8 
            , 
            5 
           
         
        
          χ 
          
            5 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              200 
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{40,21}=\chi _{8,5}\chi _{5,1}=\left({\frac {200}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            40 
            , 
            31 
           
         
        = 
        
          χ 
          
            8 
            , 
            7 
           
         
        
          χ 
          
            5 
            , 
            1 
           
         
        = 
        
          χ 
          
            4 
            , 
            3 
           
         
        
          χ 
          
            5 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                − 
                100 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{40,31}=\chi _{8,7}\chi _{5,1}=\chi _{4,3}\chi _{5,1}=\left({\frac {-100}{\bullet }}\right)} 
   
    
  
    
      
        
          χ 
          
            40 
            , 
            39 
           
         
        = 
        
          χ 
          
            8 
            , 
            7 
           
         
        
          χ 
          
            5 
            , 
            4 
           
         
        = 
        
          χ 
          
            4 
            , 
            3 
           
         
        
          χ 
          
            5 
            , 
            4 
           
         
        = 
        
          ( 
          
            
              
                − 
                20 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{40,39}=\chi _{8,7}\chi _{5,4}=\chi _{4,3}\chi _{5,4}=\left({\frac {-20}{\bullet }}\right)} 
   
    
The Dirichlet L-series for a character 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   is
  
    
      
        L 
        ( 
        s 
        , 
        χ 
        ) 
        = 
        
          ∑ 
          
            n 
            = 
            1 
           
          
            ∞ 
           
         
        
          
            
              χ 
              ( 
              n 
              ) 
             
            
              n 
              
                s 
               
             
           
         
        . 
       
     
    {\displaystyle L(s,\chi )=\sum _{n=1}^{\infty }{\frac {\chi (n)}{n^{s}}}.} 
   
  
This series converges absolutely for 
  
    
      
        
          
            R 
           
         
        ( 
        s 
        ) 
        > 
        1 
       
     
    {\displaystyle {\mathfrak {R}}(s)>1} 
   
  .  If the character is non-principal then furthermore it converges (but not absolutely) for 
  
    
      
        
          
            R 
           
         
        ( 
        s 
        ) 
        > 
        0 
       
     
    {\textstyle {\mathfrak {R}}(s)>0} 
   
   and it can be analytically continued  to an entire function , defined and differentiable on the whole complex plane.  If the character is principal then the series it converges only for 
  
    
      
        
          
            R 
           
         
        ( 
        s 
        ) 
        > 
        1 
       
     
    {\textstyle {\mathfrak {R}}(s)>1} 
   
  ; in this case, it can be analytically continued to a meromorphic function  with simple pole at 
  
    
      
        s 
        = 
        1 
       
     
    {\textstyle s=1} 
   
  .
Dirichlet introduced the 
  
    
      
        L 
       
     
    {\displaystyle L} 
   
  -function along with the characters in his 1837 paper.
 
Dirichlet characters appear several places in the theory of modular forms and functions.  A typical example is[ 45]  
Let 
  
    
      
        χ 
        ∈ 
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                M 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
       
     
    {\displaystyle \chi \in {\widehat {(\mathbb {Z} /M\mathbb {Z} )^{\times }}}} 
   
   and let 
  
    
      
        
          χ 
          
            1 
           
         
        ∈ 
        
          
            
              
                ( 
                
                  Z 
                 
                
                  / 
                 
                N 
                
                  Z 
                 
                
                  ) 
                  
                    × 
                   
                 
               
              ^ 
             
           
         
       
     
    {\displaystyle \chi _{1}\in {\widehat {(\mathbb {Z} /N\mathbb {Z} )^{\times }}}} 
   
   be primitive.
If
  
    
      
        f 
        ( 
        z 
        ) 
        = 
        ∑ 
        
          a 
          
            n 
           
         
        
          z 
          
            n 
           
         
        ∈ 
        
          M 
          
            k 
           
         
        ( 
        M 
        , 
        χ 
        ) 
       
     
    {\displaystyle f(z)=\sum a_{n}z^{n}\in M_{k}(M,\chi )} 
   
 [ 46]  
define
  
    
      
        
          f 
          
            
              χ 
              
                1 
               
             
           
         
        ( 
        z 
        ) 
        = 
        ∑ 
        
          χ 
          
            1 
           
         
        ( 
        n 
        ) 
        
          a 
          
            n 
           
         
        
          z 
          
            n 
           
         
       
     
    {\displaystyle f_{\chi _{1}}(z)=\sum \chi _{1}(n)a_{n}z^{n}} 
   
  ,[ 47]      
Then
  
    
      
        
          f 
          
            
              χ 
              
                1 
               
             
           
         
        ( 
        z 
        ) 
        ∈ 
        
          M 
          
            k 
           
         
        ( 
        M 
        
          N 
          
            2 
           
         
        , 
        χ 
        
          χ 
          
            1 
           
          
            2 
           
         
        ) 
       
     
    {\displaystyle f_{\chi _{1}}(z)\in M_{k}(MN^{2},\chi \chi _{1}^{2})} 
   
  . If 
  
    
      
        f 
       
     
    {\displaystyle f} 
   
   is a cusp form  so is 
  
    
      
        
          f 
          
            
              χ 
              
                1 
               
             
           
         
        . 
       
     
    {\displaystyle f_{\chi _{1}}.} 
   
  
See theta series of a Dirichlet character  for another example.
 
The Gauss sum of a Dirichlet character modulo N  is
  
    
      
        G 
        ( 
        χ 
        ) 
        = 
        
          ∑ 
          
            a 
            = 
            1 
           
          
            N 
           
         
        χ 
        ( 
        a 
        ) 
        
          e 
          
            
              
                2 
                π 
                i 
                a 
               
              N 
             
           
         
        . 
       
     
    {\displaystyle G(\chi )=\sum _{a=1}^{N}\chi (a)e^{\frac {2\pi ia}{N}}.} 
   
  
It appears in the functional equation  of the Dirichlet L-function .
 
If  
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   and 
  
    
      
        ψ 
       
     
    {\displaystyle \psi } 
   
   are Dirichlet characters mod a prime 
  
    
      
        p 
       
     
    {\displaystyle p} 
   
   their Jacobi sum is
  
    
      
        J 
        ( 
        χ 
        , 
        ψ 
        ) 
        = 
        
          ∑ 
          
            a 
            = 
            2 
           
          
            p 
            − 
            1 
           
         
        χ 
        ( 
        a 
        ) 
        ψ 
        ( 
        1 
        − 
        a 
        ) 
        . 
       
     
    {\displaystyle J(\chi ,\psi )=\sum _{a=2}^{p-1}\chi (a)\psi (1-a).} 
   
  
Jacobi sums can be factored into products of Gauss sums.
 
If 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   is a Dirichlet character mod 
  
    
      
        q 
       
     
    {\displaystyle q} 
   
   and 
  
    
      
        ζ 
        = 
        
          e 
          
            
              
                2 
                π 
                i 
               
              q 
             
           
         
       
     
    {\displaystyle \zeta =e^{\frac {2\pi i}{q}}} 
   
   the Kloosterman sum 
  
    
      
        K 
        ( 
        a 
        , 
        b 
        , 
        χ 
        ) 
       
     
    {\displaystyle K(a,b,\chi )} 
   
   is defined as[ 48]  
  
    
      
        K 
        ( 
        a 
        , 
        b 
        , 
        χ 
        ) 
        = 
        
          ∑ 
          
            r 
            ∈ 
            ( 
            
              Z 
             
            
              / 
             
            q 
            
              Z 
             
            
              ) 
              
                × 
               
             
           
         
        χ 
        ( 
        r 
        ) 
        
          ζ 
          
            a 
            r 
            + 
            
              
                b 
                r 
               
             
           
         
        . 
       
     
    {\displaystyle K(a,b,\chi )=\sum _{r\in (\mathbb {Z} /q\mathbb {Z} )^{\times }}\chi (r)\zeta ^{ar+{\frac {b}{r}}}.} 
   
  
If 
  
    
      
        b 
        = 
        0 
       
     
    {\displaystyle b=0} 
   
   it is a Gauss sum.
Sufficient conditions [ edit ]  
It is not necessary to establish the defining  properties 1) – 3) to show that a function is a Dirichlet character.
 From Davenport's book[ edit ]  
If 
  
    
      
        
          X 
         
        : 
        
          Z 
         
        → 
        
          C 
         
       
     
    {\displaystyle \mathrm {X} :\mathbb {Z} \rightarrow \mathbb {C} } 
   
   such that
1)   
  
    
      
        
          X 
         
        ( 
        a 
        b 
        ) 
        = 
        
          X 
         
        ( 
        a 
        ) 
        
          X 
         
        ( 
        b 
        ) 
        , 
       
     
    {\displaystyle \mathrm {X} (ab)=\mathrm {X} (a)\mathrm {X} (b),} 
   
  
2)   
  
    
      
        
          X 
         
        ( 
        a 
        + 
        m 
        ) 
        = 
        
          X 
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \mathrm {X} (a+m)=\mathrm {X} (a)} 
   
  , 
3)   If 
  
    
      
        gcd 
        ( 
        a 
        , 
        m 
        ) 
        > 
        1 
       
     
    {\displaystyle \gcd(a,m)>1} 
   
   then 
  
    
      
        
          X 
         
        ( 
        a 
        ) 
        = 
        0 
       
     
    {\displaystyle \mathrm {X} (a)=0} 
   
  , but 
4)   
  
    
      
        
          X 
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \mathrm {X} (a)} 
   
   is not always 0,  
then 
  
    
      
        
          X 
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \mathrm {X} (a)} 
   
   is one of the 
  
    
      
        ϕ 
        ( 
        m 
        ) 
       
     
    {\displaystyle \phi (m)} 
   
   characters mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
 [ 49]  
 Sárközy's Condition[ edit ]  
A Dirichlet character is a completely multiplicative function 
  
    
      
        f 
        : 
        
          N 
         
        → 
        
          C 
         
       
     
    {\displaystyle f:\mathbb {N} \rightarrow \mathbb {C} } 
   
   that satisfies a linear recurrence relation : that is, if 
  
    
      
        
          a 
          
            1 
           
         
        f 
        ( 
        n 
        + 
        
          b 
          
            1 
           
         
        ) 
        + 
        ⋯ 
        + 
        
          a 
          
            k 
           
         
        f 
        ( 
        n 
        + 
        
          b 
          
            k 
           
         
        ) 
        = 
        0 
       
     
    {\displaystyle a_{1}f(n+b_{1})+\cdots +a_{k}f(n+b_{k})=0} 
   
  
for all positive integers 
  
    
      
        n 
       
     
    {\displaystyle n} 
   
  , where 
  
    
      
        
          a 
          
            1 
           
         
        , 
        … 
        , 
        
          a 
          
            k 
           
         
       
     
    {\displaystyle a_{1},\ldots ,a_{k}} 
   
   are not all zero and 
  
    
      
        
          b 
          
            1 
           
         
        , 
        … 
        , 
        
          b 
          
            k 
           
         
       
     
    {\displaystyle b_{1},\ldots ,b_{k}} 
   
   are distinct then 
  
    
      
        f 
       
     
    {\displaystyle f} 
   
   is a Dirichlet character.[ 50]  
 Chudakov's Condition[ edit ]  
A Dirichlet character is a completely multiplicative function 
  
    
      
        f 
        : 
        
          N 
         
        → 
        
          C 
         
       
     
    {\displaystyle f:\mathbb {N} \rightarrow \mathbb {C} } 
   
   satisfying the following three properties: a) 
  
    
      
        f 
       
     
    {\displaystyle f} 
   
   takes only finitely many values; b) 
  
    
      
        f 
       
     
    {\displaystyle f} 
   
   vanishes at only finitely many primes; c) there is an 
  
    
      
        α 
        ∈ 
        
          C 
         
       
     
    {\displaystyle \alpha \in \mathbb {C} } 
   
   for which the remainder
  
    
      
        
          | 
          
            
              ∑ 
              
                n 
                ≤ 
                x 
               
             
            f 
            ( 
            n 
            ) 
            − 
            α 
            x 
           
          | 
         
       
     
    {\displaystyle \left|\sum _{n\leq x}f(n)-\alpha x\right|} 
   
  
is uniformly bounded, as 
  
    
      
        x 
        → 
        ∞ 
       
     
    {\displaystyle x\rightarrow \infty } 
   
  . This equivalent definition of Dirichlet characters was conjectured by Chudakov[ 51]   in 1956, and proved in 2017 by Klurman and Mangerel.[ 52]  
Some notable special modules [ edit ]  
8, the smallest module whose Dirichlet characters need more than one generator 
13, the smallest module whose Dirichlet characters contain numbers 
  
    
      
        α 
       
     
    {\displaystyle \alpha } 
   
   such that there is no primes  p in 
  
    
      
        Z 
       
     
    {\displaystyle Z} 
   
   which are still primes in 
  
    
      
        Z 
        [ 
        α 
        ] 
       
     
    {\displaystyle Z[\alpha ]} 
   
  
19, the smallest module whose Dirichlet characters contain numbers whose real and imaginary parts are not constructible numbers  
24, the largest module whose Dirichlet characters are all real  (the Dirichlet characters of the number n are all real if and only if n is divisor of 24) 
47, the smallest module whose Dirichlet characters contain numbers 
  
    
      
        α 
       
     
    {\displaystyle \alpha } 
   
   such that the class number  
  
    
      
        
          h 
          
            − 
           
         
       
     
    {\displaystyle h^{-}} 
   
   of the cyclotomic field  
  
    
      
        Q 
        ( 
        α 
        ) 
       
     
    {\displaystyle Q(\alpha )} 
   
   is greater than 1 
120, the smallest module whose Dirichlet characters need more than three generators 
149, the smallest module whose Dirichlet characters contain numbers 
  
    
      
        α 
       
     
    {\displaystyle \alpha } 
   
   such that the full class number  
  
    
      
        
          h 
          
            − 
           
         
        ⋅ 
        
          h 
          
            + 
           
         
       
     
    {\displaystyle h^{-}\cdot h^{+}} 
   
   of the cyclotomic field  
  
    
      
        Q 
        ( 
        α 
        ) 
       
     
    {\displaystyle Q(\alpha )} 
   
   is not coprime  to the smallest number such that 
  
    
      
        
          α 
          
            n 
           
         
        = 
        1 
       
     
    {\displaystyle \alpha ^{n}=1} 
   
   (related to irregular prime ) 
240, the largest module whose Dirichlet characters are all Gaussian integers  (the Dirichlet characters of the number n are all Gaussian integers if and only if n is divisor of 240) 
383, the smallest module whose Dirichlet characters contain numbers 
  
    
      
        α 
       
     
    {\displaystyle \alpha } 
   
   such that the class number  
  
    
      
        
          h 
          
            + 
           
         
       
     
    {\displaystyle h^{+}} 
   
   of the cyclotomic field  
  
    
      
        Q 
        ( 
        α 
        ) 
       
     
    {\displaystyle Q(\alpha )} 
   
   is greater than 1 
504, the largest module whose Dirichlet characters are all Eisenstein integers  (the Dirichlet characters of the number n are all Eisenstein integers if and only if n is divisor of 504) 
840, the smallest module whose Dirichlet characters need more than four generators  
^   This is the standard definition; e.g. Davenport p.27; Landau p. 109; Ireland and Rosen p. 253 
 
^   Note the special case of modulus 1: the unique character mod 1 is the constant 1; all other characters are 0 at 0 
 
^   Davenport p. 1 
 
^   An English translation is in External Links 
 
^   Weisstein, Eric W. "Totient Function" . mathworld.wolfram.com . Retrieved 2025-02-09  .  
 
^   Used in Davenport, Landau, Ireland and Rosen 
 
^   
  
    
      
        ( 
        r 
        s 
        , 
        m 
        ) 
        = 
        1 
       
     
    {\displaystyle (rs,m)=1} 
   
   is equivalent to 
  
    
      
        gcd 
        ( 
        r 
        , 
        m 
        ) 
        = 
        gcd 
        ( 
        s 
        , 
        m 
        ) 
        = 
        1 
       
     
    {\displaystyle \gcd(r,m)=\gcd(s,m)=1} 
   
  
 
^   See Multiplicative character  
 
^   Ireland and Rosen p. 253-254 
 
^   See Character group#Orthogonality of characters  
 
^   Davenport p. 27 
 
^   These properties are derived in all introductions to the subject, e.g. Davenport p. 27, Landau p. 109. 
 
^   In general, the product of a character mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   and a character mod 
  
    
      
        n 
       
     
    {\displaystyle n} 
   
   is a character mod 
  
    
      
        lcm 
         
        ( 
        m 
        , 
        n 
        ) 
       
     
    {\displaystyle \operatorname {lcm} (m,n)} 
   
  
 
^   Except for the use of the modified Conrie labeling, this section follows  Davenport pp. 1-3, 27-30 
 
^   There is a primitive root mod 
  
    
      
        p 
       
     
    {\displaystyle p} 
   
   which is a primitive root mod 
  
    
      
        
          p 
          
            2 
           
         
       
     
    {\displaystyle p^{2}} 
   
   and all higher powers of 
  
    
      
        p 
       
     
    {\displaystyle p} 
   
  . See, e.g., Landau p. 106 
 
^   Landau pp. 107-108 
 
^   See group of units  for details 
 
^   To construct the 
  
    
      
        
          G 
          
            i 
           
         
        , 
       
     
    {\displaystyle G_{i},} 
   
   for each 
  
    
      
        a 
        ∈ 
        ( 
        
          Z 
         
        
          / 
         
        
          q 
          
            i 
           
         
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle a\in (\mathbb {Z} /q_{i}\mathbb {Z} )^{\times }} 
   
   use the CRT to find 
  
    
      
        
          a 
          
            i 
           
         
        ∈ 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle a_{i}\in (\mathbb {Z} /m\mathbb {Z} )^{\times }} 
   
   where
  
    
      
        
          a 
          
            i 
           
         
        ≡ 
        
          
            { 
            
              
                
                  a 
                 
                
                   
                  mod 
                   
                   
                  
                    q 
                    
                      i 
                     
                   
                 
               
              
                
                  1 
                 
                
                   
                  mod 
                   
                   
                  
                    q 
                    
                      j 
                     
                   
                  , 
                  j 
                  ≠ 
                  i 
                  . 
                 
               
             
             
           
         
       
     
    {\displaystyle a_{i}\equiv {\begin{cases}a&\mod q_{i}\\1&\mod q_{j},j\neq i.\end{cases}}} 
   
  
  
^   Assume 
  
    
      
        a 
       
     
    {\displaystyle a} 
   
   corresponds to 
  
    
      
        ( 
        
          a 
          
            1 
           
         
        , 
        
          a 
          
            2 
           
         
        , 
        . 
        . 
        . 
        ) 
       
     
    {\displaystyle (a_{1},a_{2},...)} 
   
  . By construction 
  
    
      
        
          a 
          
            1 
           
         
       
     
    {\displaystyle a_{1}} 
   
   corresponds to 
  
    
      
        ( 
        
          a 
          
            1 
           
         
        , 
        1 
        , 
        1 
        , 
        . 
        . 
        . 
        ) 
       
     
    {\displaystyle (a_{1},1,1,...)} 
   
  , 
  
    
      
        
          a 
          
            2 
           
         
       
     
    {\displaystyle a_{2}} 
   
   to 
  
    
      
        ( 
        1 
        , 
        
          a 
          
            2 
           
         
        , 
        1 
        , 
        . 
        . 
        . 
        ) 
       
     
    {\displaystyle (1,a_{2},1,...)} 
   
   etc. whose coordinate-wise product is 
  
    
      
        ( 
        
          a 
          
            1 
           
         
        , 
        
          a 
          
            2 
           
         
        , 
        . 
        . 
        . 
        ) 
        . 
       
     
    {\displaystyle (a_{1},a_{2},...).} 
   
  
 
^   For example let 
  
    
      
        m 
        = 
        40 
        , 
        
          q 
          
            1 
           
         
        = 
        8 
        , 
        
          q 
          
            2 
           
         
        = 
        5. 
       
     
    {\displaystyle m=40,q_{1}=8,q_{2}=5.} 
   
   Then 
  
    
      
        
          G 
          
            1 
           
         
        = 
        { 
        1 
        , 
        11 
        , 
        21 
        , 
        31 
        } 
       
     
    {\displaystyle G_{1}=\{1,11,21,31\}} 
   
   and 
  
    
      
        
          G 
          
            2 
           
         
        = 
        { 
        1 
        , 
        9 
        , 
        17 
        , 
        33 
        } 
        . 
       
     
    {\displaystyle G_{2}=\{1,9,17,33\}.} 
   
   The factorization of the elements of 
  
    
      
        ( 
        
          Z 
         
        
          / 
         
        40 
        
          Z 
         
        
          ) 
          
            × 
           
         
       
     
    {\displaystyle (\mathbb {Z} /40\mathbb {Z} )^{\times }} 
   
   is 
  
    
      
        
          
            
              
                 
                
                  1 
                 
                
                  9 
                 
                
                  17 
                 
                
                  33 
                 
               
              
                
                  1 
                 
                
                  1 
                 
                
                  9 
                 
                
                  17 
                 
                
                  33 
                 
               
              
                
                  11 
                 
                
                  11 
                 
                
                  19 
                 
                
                  27 
                 
                
                  3 
                 
               
              
                
                  21 
                 
                
                  21 
                 
                
                  29 
                 
                
                  37 
                 
                
                  13 
                 
               
              
                
                  31 
                 
                
                  31 
                 
                
                  39 
                 
                
                  7 
                 
                
                  23 
                 
               
             
           
         
       
     
    {\displaystyle {\begin{array}{|c|c|c|c|c|c|c|}&1&9&17&33\\\hline 1&1&9&17&33\\11&11&19&27&3\\21&21&29&37&13\\31&31&39&7&23\\\end{array}}} 
   
  
  
^   See Conrey labeling . 
 
^   Because these formulas are true for each factor. 
 
^   This is true for all finite abelian groups: 
  
    
      
        A 
        ≅ 
        
          
            
              A 
              ^ 
             
           
         
       
     
    {\displaystyle A\cong {\hat {A}}} 
   
  ; See Ireland & Rosen pp. 253-254 
 
^   because the formulas for 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
   mod prime powers are symmetric in 
  
    
      
        r 
       
     
    {\displaystyle r} 
   
   and 
  
    
      
        s 
       
     
    {\displaystyle s} 
   
   and the formula for products preserves this symmetry. See Davenport, p. 29. 
 
^   This is the same thing as saying that the n-th column and the n-th row in the tables of nonzero values are the same. 
 
^   See #Relation to group characters  above. 
 
^   by the definition of 
  
    
      
        
          χ 
          
            0 
           
         
       
     
    {\displaystyle \chi _{0}} 
   
  
 
^   because multiplying every element in a group by a constant element merely permutes the elements. See Group (mathematics)  
 
^   Davenport p. 30 (paraphrase) To prove [the second relation] one has to use ideas that we have used in the construction [as in this article or Landau pp. 109-114], or appeal to the basis theorem for abelian groups [as in Ireland & Rosen pp. 253-254] 
 
^   Davenport chs. 1, 4; Landau p. 114 
 
^   Note that if 
  
    
      
        g 
        : 
        ( 
        
          Z 
         
        
          / 
         
        m 
        
          Z 
         
        
          ) 
          
            × 
           
         
        → 
        
          C 
         
       
     
    {\displaystyle g:(\mathbb {Z} /m\mathbb {Z} )^{\times }\rightarrow \mathbb {C} } 
   
   is any function
  
    
      
        g 
        ( 
        n 
        ) 
        = 
        
          ∑ 
          
            a 
            ∈ 
            ( 
            
              Z 
             
            
              / 
             
            m 
            
              Z 
             
            
              ) 
              
                × 
               
             
           
         
        g 
        ( 
        a 
        ) 
        
          f 
          
            a 
           
         
        ( 
        n 
        ) 
       
     
    {\displaystyle g(n)=\sum _{a\in (\mathbb {Z} /m\mathbb {Z} )^{\times }}g(a)f_{a}(n)} 
   
  ; see Fourier transform on finite groups#Fourier transform for finite abelian groups  
 
^   This section follows Davenport pp. 35-36, 
 
^   Platt, Dave. "Dirichlet characters Def. 11.10"  (PDF) . Retrieved April 5,  2024 .  
 
^   "Conductor of a Dirichlet character (reviewed)" . LMFDB . Retrieved April 5,  2024 . 
 
^   Davenport classifies it as neither primitive nor imprimitive; the LMFDB induces it from 
  
    
      
        
          χ 
          
            1 
            , 
            1 
           
         
        . 
       
     
    {\displaystyle \chi _{1,1}.} 
   
  
 
^ a   b   Note that if 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   is two times an odd number, 
  
    
      
        m 
        = 
        2 
        r 
       
     
    {\displaystyle m=2r} 
   
  , all characters mod 
  
    
      
        m 
       
     
    {\displaystyle m} 
   
   are imprimitive because 
  
    
      
        
          χ 
          
            m 
            , 
            _ 
           
         
        = 
        
          χ 
          
            r 
            , 
            _ 
           
         
        
          χ 
          
            2 
            , 
            1 
           
         
       
     
    {\displaystyle \chi _{m,\_}=\chi _{r,\_}\chi _{2,1}} 
   
  
 
^   For example the functional equation of 
  
    
      
        L 
        ( 
        s 
        , 
        χ 
        ) 
       
     
    {\displaystyle L(s,\chi )} 
   
   is only valid for primitive 
  
    
      
        χ 
       
     
    {\displaystyle \chi } 
   
  . See  Davenport, p. 85 
 
^   In fact, for prime modulus 
  
    
      
        p 
         
         
        
          χ 
          
            p 
            , 
            − 
            1 
           
         
       
     
    {\displaystyle p\;\;\chi _{p,-1}} 
   
    is the Legendre symbol : 
  
    
      
        
          χ 
          
            p 
            , 
            − 
            1 
           
         
        ( 
        a 
        ) 
        = 
        
          ( 
          
            
              a 
              p 
             
           
          ) 
         
        . 
         
       
     
    {\displaystyle \chi _{p,-1}(a)=\left({\frac {a}{p}}\right).\;} 
   
   Sketch of proof: 
  
    
      
        
          ν 
          
            p 
           
         
        ( 
        − 
        1 
        ) 
        = 
        
          
            
              p 
              − 
              1 
             
            2 
           
         
        , 
         
         
        
          ω 
          
            
              ν 
              
                p 
               
             
            ( 
            − 
            1 
            ) 
           
         
        = 
        − 
        1 
        , 
         
         
        
          ν 
          
            p 
           
         
        ( 
        a 
        ) 
       
     
    {\displaystyle \nu _{p}(-1)={\frac {p-1}{2}},\;\;\omega ^{\nu _{p}(-1)}=-1,\;\;\nu _{p}(a)} 
   
   is even (odd) if a is a quadratic residue (nonresidue) 
 
^   Davenport, chs. 1, 4. 
 
^   Ireland and Rosen's proof, valid for all moduli, also has these two cases. pp. 259 ff 
 
^   Davenport p. 40 
 
^   The notation 
  
    
      
        
          χ 
          
            m 
            , 
            1 
           
         
        = 
        
          ( 
          
            
              
                m 
                
                  2 
                 
               
              ∙ 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{m,1}=\left({\frac {m^{2}}{\bullet }}\right)} 
   
   is a shorter way of writing 
  
    
      
        
          χ 
          
            m 
            , 
            1 
           
         
        ( 
        a 
        ) 
        = 
        
          ( 
          
            
              
                m 
                
                  2 
                 
               
              a 
             
           
          ) 
         
       
     
    {\displaystyle \chi _{m,1}(a)=\left({\frac {m^{2}}{a}}\right)} 
   
  
 
^   The product of primes ensures it is zero if 
  
    
      
        gcd 
        ( 
        m 
        , 
        ∙ 
        ) 
        > 
        1 
       
     
    {\displaystyle \gcd(m,\bullet )>1} 
   
  ; the squares ensure its only nonzero value is 1. 
 
^   Davenport pp. 38-40 
 
^   Koblittz, prop. 17b p. 127 
 
^   
  
    
      
        f 
        ( 
        z 
        ) 
        ∈ 
        
          M 
          
            k 
           
         
        ( 
        M 
        , 
        χ 
        ) 
       
     
    {\displaystyle f(z)\in M_{k}(M,\chi )} 
   
   means
1) 
  
    
      
        f 
        ( 
        
          
            
              a 
              z 
              + 
              b 
             
            
              c 
              z 
              + 
              d 
             
           
         
        ) 
        ( 
        c 
        z 
        + 
        d 
        
          ) 
          
            − 
            k 
           
         
        = 
        f 
        ( 
        z 
        ) 
       
     
    {\displaystyle f({\frac {az+b}{cz+d}})(cz+d)^{-k}=f(z)} 
   
   where 
  
    
      
        a 
        d 
        − 
        b 
        c 
        = 
        1 
       
     
    {\displaystyle ad-bc=1} 
   
   and
  
    
      
        a 
        ≡ 
        d 
        ≡ 
        1 
        , 
         
         
        c 
        ≡ 
        0 
        
           
          ( 
          mod 
           
          M 
          ) 
         
        . 
       
     
    {\displaystyle a\equiv d\equiv 1,\;\;c\equiv 0{\pmod {M}}.} 
   
  
and 2) 
  
    
      
        f 
        ( 
        
          
            
              a 
              z 
              + 
              b 
             
            
              c 
              z 
              + 
              d 
             
           
         
        ) 
        ( 
        c 
        z 
        + 
        d 
        
          ) 
          
            − 
            k 
           
         
        = 
        χ 
        ( 
        d 
        ) 
        f 
        ( 
        z 
        ) 
       
     
    {\displaystyle f({\frac {az+b}{cz+d}})(cz+d)^{-k}=\chi (d)f(z)} 
   
   where 
  
    
      
        a 
        d 
        − 
        b 
        c 
        = 
        1 
       
     
    {\displaystyle ad-bc=1} 
   
   and 
  
    
      
        c 
        ≡ 
        0 
        
           
          ( 
          mod 
           
          M 
          ) 
         
        . 
       
     
    {\displaystyle c\equiv 0{\pmod {M}}.} 
   
   See Koblitz Ch. III. 
 
^   the twist  of 
  
    
      
        f 
       
     
    {\displaystyle f} 
   
   by 
  
    
      
        
          χ 
          
            1 
           
         
       
     
    {\displaystyle \chi _{1}} 
   
  
 
^   LMFDB definition of Kloosterman sum  
 
^   Davenport p. 30 
 
^   Sarkozy 
 
^   Chudakov 
 
^   Klurman 
 
  
Chudakov, N.G. "Theory of the characters of number semigroups". J. Indian Math. Soc . 20 : 11– 15.  
Davenport, Harold  (1967). Multiplicative number theory . Lectures in advanced mathematics. Vol. 1. Chicago: Markham. Zbl  0159.06303 . 
Ireland, Kenneth; Rosen, Michael (1990), A Classical Introduction to Modern Number Theory (Second edition) , New York: Springer , ISBN  0-387-97329-X   
Klurman, Oleksiy; Mangerel, Alexander P. (2017). "Rigidity Theorems for Multiplicative Functions". Math. Ann . 372  (1): 651– 697. arXiv :1707.07817  . Bibcode :2017arXiv170707817K . doi :10.1007/s00208-018-1724-6 . S2CID  119597384 .  
Koblitz, Neal  (1993). Introduction to Elliptic Curves and Modular Forms . Graduate Texts in Mathematics. Vol. 97 (2nd revised ed.). Springer-Verlag . ISBN  0-387-97966-2  . 
Landau, Edmund (1966), Elementary Number Theory , New York: Chelsea  
Sarkozy, Andras. "On multiplicative arithmetic functions satisfying a linear recursion". Studia Sci. Math. Hung . 13  (1– 2): 79– 104.