[<< wikibooks] Topology/Path Connectedness
== Definition ==
A topological space 
  
    
      
        X
      
    
    {\displaystyle X}
   is said to be path connected if for any two points 
  
    
      
        
          x
          
            0
          
        
        ,
        
          x
          
            1
          
        
        ∈
        X
      
    
    {\displaystyle x_{0},x_{1}\in X}
   there exists a continuous function 
  
    
      
        f
        :
        [
        0
        ,
        1
        ]
        →
        X
      
    
    {\displaystyle f:[0,1]\to X}
   such that 
  
    
      
        f
        (
        0
        )
        =
        
          x
          
            0
          
        
      
    
    {\displaystyle f(0)=x_{0}}
   and 
  
    
      
        f
        (
        1
        )
        =
        
          x
          
            1
          
        
      
    
    {\displaystyle f(1)=x_{1}}
  


== Example ==
All convex sets in a vector space are connected because one could just use the segment connecting them, which is 
  
    
      
        f
        (
        t
        )
        =
        t
        
          
            
              a
              →
            
          
        
        +
        (
        1
        −
        t
        )
        
          
            
              b
              →
            
          
        
      
    
    {\displaystyle f(t)=t{\vec {a}}+(1-t){\vec {b}}}
  .
The unit square defined by the vertices 
  
    
      
        [
        0
        ,
        0
        ]
        ,
        [
        1
        ,
        0
        ]
        ,
        [
        0
        ,
        1
        ]
        ,
        [
        1
        ,
        1
        ]
      
    
    {\displaystyle [0,0],[1,0],[0,1],[1,1]}
   is path connected. Given two points 
  
    
      
        (
        
          a
          
            0
          
        
        ,
        
          b
          
            0
          
        
        )
        ,
        (
        
          a
          
            1
          
        
        ,
        
          b
          
            1
          
        
        )
        ∈
        [
        0
        ,
        1
        ]
        ×
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle (a_{0},b_{0}),(a_{1},b_{1})\in [0,1]\times [0,1]}
   the points are connected by the function 
  
    
      
        f
        (
        t
        )
        =
        [
        (
        1
        −
        t
        )
        
          a
          
            0
          
        
        +
        t
        
          a
          
            1
          
        
        ,
        (
        1
        −
        t
        )
        
          b
          
            0
          
        
        +
        t
        
          b
          
            1
          
        
        ]
      
    
    {\displaystyle f(t)=[(1-t)a_{0}+ta_{1},(1-t)b_{0}+tb_{1}]}
   for 
  
    
      
        t
        ∈
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle t\in [0,1]}
  .The preceding example works in any convex space (it is in fact almost the definition of a convex space).


== Adjoining Paths ==
Let 
  
    
      
        X
      
    
    {\displaystyle X}
   be a topological space and let 
  
    
      
        a
        ,
        b
        ,
        c
        ∈
        X
      
    
    {\displaystyle a,b,c\in X}
  . Consider two continuous functions 
  
    
      
        
          f
          
            1
          
        
        ,
        
          f
          
            2
          
        
        :
        [
        0
        ,
        1
        ]
        →
        X
      
    
    {\displaystyle f_{1},f_{2}:[0,1]\to X}
   such that 
  
    
      
        
          f
          
            1
          
        
        (
        0
        )
        =
        a
      
    
    {\displaystyle f_{1}(0)=a}
  , 
  
    
      
        
          f
          
            1
          
        
        (
        1
        )
        =
        b
        =
        
          f
          
            2
          
        
        (
        0
        )
      
    
    {\displaystyle f_{1}(1)=b=f_{2}(0)}
   and 
  
    
      
        
          f
          
            2
          
        
        (
        1
        )
        =
        c
      
    
    {\displaystyle f_{2}(1)=c}
  . Then the function defined by

  
    
      
        f
        (
        x
        )
        =
        
          {
          
            
              
                
                  
                    f
                    
                      1
                    
                  
                  (
                  2
                  x
                  )
                
                
                  
                    if 
                  
                  x
                  ∈
                  [
                  0
                  ,
                  
                    
                      1
                      2
                    
                  
                  ]
                
              
              
                
                  
                    f
                    
                      2
                    
                  
                  (
                  2
                  x
                  −
                  1
                  )
                
                
                  
                    if 
                  
                  x
                  ∈
                  [
                  
                    
                      1
                      2
                    
                  
                  ,
                  1
                  ]
                
              
            
          
          
        
      
    
    {\displaystyle f(x)=\left\{{\begin{array}{ll}f_{1}(2x)&{\text{if }}x\in [0,{\frac {1}{2}}]\\f_{2}(2x-1)&{\text{if }}x\in [{\frac {1}{2}},1]\\\end{array}}\right.}
  
Is a continuous path from 
  
    
      
        a
      
    
    {\displaystyle a}
   to 
  
    
      
        c
      
    
    {\displaystyle c}
  . Thus, a path from 
  
    
      
        a
      
    
    {\displaystyle a}
   to 
  
    
      
        b
      
    
    {\displaystyle b}
   and a path from 
  
    
      
        b
      
    
    {\displaystyle b}
   to 
  
    
      
        c
      
    
    {\displaystyle c}
   can be adjoined together to form a path from 
  
    
      
        a
      
    
    {\displaystyle a}
   to 
  
    
      
        c
      
    
    {\displaystyle c}
  .


== Relation to Connectedness ==
Each path connected space 
  
    
      
        X
      
    
    {\displaystyle X}
   is also connected. This can be seen as follows:
Assume that 
  
    
      
        X
      
    
    {\displaystyle X}
   is not connected. Then 
  
    
      
        X
      
    
    {\displaystyle X}
   is the disjoint union of two open sets 
  
    
      
        A
      
    
    {\displaystyle A}
   and 
  
    
      
        B
      
    
    {\displaystyle B}
  . Let 
  
    
      
        a
        ∈
        A
      
    
    {\displaystyle a\in A}
   and 
  
    
      
        b
        ∈
        B
      
    
    {\displaystyle b\in B}
  . Then there is a path 
  
    
      
        f
      
    
    {\displaystyle f}
   from 
  
    
      
        a
      
    
    {\displaystyle a}
   to 
  
    
      
        b
      
    
    {\displaystyle b}
  , i.e., 
  
    
      
        f
        :
        [
        0
        ,
        1
        ]
        →
        X
      
    
    {\displaystyle f:[0,1]\rightarrow X}
   is a continuous function with 
  
    
      
        f
        (
        0
        )
        =
        a
      
    
    {\displaystyle f(0)=a}
   and 
  
    
      
        f
        (
        1
        )
        =
        b
      
    
    {\displaystyle f(1)=b}
  . But then 
  
    
      
        
          f
          
            −
            1
          
        
        (
        A
        )
      
    
    {\displaystyle f^{-1}(A)}
   and 
  
    
      
        
          f
          
            −
            1
          
        
        (
        B
        )
      
    
    {\displaystyle f^{-1}(B)}
   are disjoint open sets in 
  
    
      
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle [0,1]}
  , covering the unit interval. This contradicts the fact that the unit interval is connected.


== Exercises ==
Prove that the set 
  
    
      
        A
        =
        {
        (
        x
        ,
        f
        (
        x
        )
        )
        
          |
        
        x
        ∈
        
          R
        
        }
        ⊂
        
          
            R
          
          
            2
          
        
      
    
    {\displaystyle A=\{(x,f(x))|x\in \mathbb {R} \}\subset \mathbb {R} ^{2}}
  , where 
  
    
      
        f
        (
        x
        )
        =
        
          {
          
            
              
                
                  0
                
                
                  
                    if 
                  
                  x
                  ≤
                  0
                
              
              
                
                  sin
                  ⁡
                  (
                  
                    
                      1
                      x
                    
                  
                  )
                
                
                  
                    if 
                  
                  x
                  >
                  0
                
              
            
          
          
        
      
    
    {\displaystyle f(x)=\left\{{\begin{array}{ll}0&{\text{if }}x\leq 0\\\sin({\frac {1}{x}})&{\text{if }}x>0\\\end{array}}\right.}
   is connected but not path connected.