{{See also|Evolution of sexual reproduction|Sex#Evolution of sex}}
The [[Anisogamy#Evolution|evolution of anisogamy]] led to the evolution of male and female function.<ref name=Bachtrogetal>{{Cite journal|last1=Bachtrog|first1=Doris|last2=Mank|first2=Judith E.|last3=Peichel|first3=Catherine L.|last4=Kirkpatrick|first4=Mark|last5=Otto|first5=Sarah P.|last6=Ashman|first6=Tia-Lynn|last7=Hahn|first7=Matthew W.|last8=Kitano|first8=Jun|last9=Mayrose|first9=Itay|last10=Ming|first10=Ray|last11=Perrin|first11=Nicolas|date=2014-07-01|title=Sex Determination: Why So Many Ways of Doing It?|journal=PLOS Biology|language=en|volume=12|issue=7|pages=e1001899|doi=10.1371/journal.pbio.1001899|issn=1545-7885|pmc=4077654|pmid=24983465}}</ref> Before the evolution of anisogamy, [[Mating type|mating types]] in a species were [[Isogamy|isogamous]]: the same size and both could move, catalogued only as "+" or "-" types.<ref>{{Citebook|last1name=Sawada|first1=Hitoshi|url=https://books.google.com/books?id=Adm6BQAAQBAJ&q=isogamy+mating+types>{{rp|title=Sexual Reproduction in Animals and Plants|last2=Inoue|first2=Naokazu|last3=Iwano|first3=Megumi|date=2014-02-07|publisher=Springer |isbn=978-4-431-54589-7|pages=216|language=en}}</ref> In anisogamy, the mating type is called a gamete. The male gamete is smaller than the female gamete, and usually mobile.<ref name="Kumar-20192">{{Cite encyclopedia|entry=Anisogamy|encyclopedia=Encyclopedia of Animal Cognition and Behavior|publisher=Springer International Publishing|place=Cham |date=2019|pages=1–5|doi=10.1007/978-3-319-47829-6_340-1|isbn=978-3-319-47829-6 |vauthors=Kumar R, Meena M, Swapnil P|title=Anisogamy |veditors=Vonk J, Shackelford T}}</ref> Anisogamy remains poorly understood, as there is no fossil record of its emergence. Numerous theories exist as to why anisogamy emerged. Many share a common thread, in that larger female gametes are more likely to survive, and that smaller male gametes are more likely to find other gametes because they can travel faster. Current models often fail to account for why isogamy remains in a few species.<ref name="Togashi-2011">{{Cite book |last1=Togashi |first1=Tatsuya |url=https://books.google.com/books?id=5eOvRTIuLXMC&pg=PA1 |title=The Evolution of Anisogamy: A Fundamental Phenomenon Underlying Sexual Selection |last2=Cox |first2=Paul Alan |date=2011-04-14 |publisher=Cambridge University Press |isbn=978-1-139-50082-1 |pages=1–15 |language=en}}</ref> Anisogamy appears to have evolved multiple times from isogamy; for example, female [[Volvocales]] (a type of green algae) evolved from the plus mating type.<ref name="Togashi-2011" /><ref name=Sawada>{{Cite book |last1=Sawada |first1=Hitoshi |url=https://books.google.com/books?id=Adm6BQAAQBAJ&pg=PA222 |title=Sexual Reproduction in Animals and Plants |last2=Inoue |first2=Naokazu |last3=Iwano |first3=Megumi |date=2014-02-07 |publisher=Springer |isbn=978-4-431-54589-7 |language=en}}</ref>{{rp|222}} Although sexual evolution emerged at least 1.2 billion years ago, the lack of anisogamous fossil records make it hard to pinpoint when males evolved.<ref name="PB-2000">{{cite journal|last=Butterfield|first=Nicholas J.|date=2000|title=Bangiomorpha pubescens n. gen., n. sp.: implications for the evolution of sex, multicellularity, and the Mesoproterozoic/Neoproterozoic radiation of eukaryotes|url=http://mr.crossref.org/iPage?doi=10.1666%2F0094-8373%282000%29026%3C0386%3ABPNGNS%3E2.0.CO%3B2|journal=[[Paleobiology (journal)|Paleobiology]]|volume=26|issue=3|page=386|doi=10.1666/0094-8373(2000)026<0386:BPNGNS>2.0.CO;2|s2cid=36648568 |access-date=12 April 2021}}</ref> One theory suggests male evolved from the dominant mating type (called mating type minus).<ref>{{Cite journal|last1=Togashi|first1=Tatsuya|last2=Bartelt|first2=John L.|last3=Yoshimura|first3=Jin|last4=Tainaka|first4=Kei-ichi|last5=Cox|first5=Paul Alan|date=2012-08-21|title=Evolutionary trajectories explain the diversified evolution of isogamy and anisogamy in marine green algae|journal=Proceedings of the National Academy of Sciences of the United States of America|volume=109|issue=34|pages=13692–13697|doi=10.1073/pnas.1203495109|issn=0027-8424|pmc=3427103|pmid=22869736|bibcode=2012PNAS..10913692T|doi-access=free}}</ref>