It is easy to regard sex as clear-cut, black and white. We regularly have to check the “male” or “female” box on various forms, we go to separate sporting events to see men and women compete, and we often choose baby clothes based on whether the bundle of joy is a boy or a girl. But in the natural world, sex is a very gray area—it is diverse, intricate, and often incredibly malleable. Our sexual configuration is just one of many in the animal kingdom, each of which has evolved over many generations to solve particular problems or to ensure success in challenging environments. Sex is simply another tool in the evolutionary toolbox. It allows animals with completely different lifestyles and demands to thrive in an amazing array of ways.

By sifting through some of the discrepancies between sex and gender in the last installment, it became clear that these two concepts are not inextricably linked. Even in the scientific world where definitions are of the utmost importance, these terms are subject to a great deal of confusion. So we turn to the most basic underpinnings of sex—what distinguishes males from females, and how sex is determined—and find there is incredible complexity even in these fundamental concepts. By looking at sex in the animal kingdom, we can learn where there are hard and fast rules in terms of males and females, and where sex is more flexible and fluid.

The basics of sex

After looking at a diverse array of animals, it’s clear males of different species differ greatly in their physiology and their behavior. The same is true of females. So what categorizes an animal as a male or a female? The most basic biological definition for each sex comes down to the gametes, or sex cells, that an animal produces. Males produce small, mobile gametes in large quantities (sperm), while females produce smaller numbers of large, stationary gametes that are nutrient-rich (eggs). The exception here, of course, is infertile individuals. However, these are the best universal definitions of “maleness” and “femaleness” that science can come up with. The difficulty involved in even coming to a single definition represents the incredible complexity associated with sex—there are endless exceptions, qualifiers, and intricacies that make a watertight definition impossible.

In some cases, a regular suite of physiological and biological characteristics accompanies the production of a specific type of gamete. For example, a large body size, flashy ornamentation, and aggressiveness often accompany sperm production. In other cases, only some of these characteristics apply, and in still others, these characteristics can be entirely reversed from the configurations we are most familiar with.

However, there is one puzzling constant when it comes to sex: as far as researchers know, every sexually reproducing animal species on earth has just two sexes that engage in reproductive behavior. (Exceptions, such as some ants, have been suggested but require a very liberal interpretation of what a “sex” is.) Since there appear to be very few hard and fast rules in terms of sex, why are there just two sexes? At first glance, a two-sex system seems quite limiting. Assuming sex ratios are equal, this means an animal can only mate with one out of every two conspecifics it comes across. With three, five, or more sexes, the mating opportunities would increase. What gives?

The answer may be due to genetic conflict. Mitochondrial DNA resides outside the nucleus of a cell, and in the ubiquitous two-sex system, females always contribute this type of genetic material to the offspring. If this wasn’t the case—if there were three or more sexes that could all mate with each other—any organism could donate mitochondrial DNA to the next generation. With no single predetermined contributor of this genetic information, a rapidly reproducing “selfish” mutation could be fixed very quickly in the population, and the result would be disastrous if the mutation were deleterious. Instead, paternal mitochondria degenerate quickly in a developing embryo, acting as a safeguard against this scenario. So a two-sex system may be the most stable arrangement, even if it makes mate-finding a bit harder.

While the number of sexes in various animal species is constant, there is no universal mechanism that determines whether an individual will be a male or a female. In the animal kingdom, sex determining systems vary drastically among species.

The XYZs of sex

For humans, it’s generally said the Y chromosome makes the male. After all, that’s where all the masculine magic happens: it’s where the “sex-determining region y” (or SRY) resides, a gene that initiates the formation of testicles in an embryo. Once this process has begun, hormones called androgens are secreted, triggering masculinization in other body parts. If an embryo has two X chromosomes, which by nature lack SRY, this cascade of events never happens. The embryo becomes a female.

Birds employ a somewhat similar chromosomal system to humans, but have Z and W chromosomes instead. In this system, the egg—not the sperm—determines the offspring’s sex, since females have a Z and a W chromosome and males have two Z chromosomes. Instead of SRY, a gene called DMRT1 on the Z chromosome is believed to determine sex in birds. Unlike the XX/XY system, where the mere presence of the sex-determining gene initiates the formation of testes, the number of copies of DMRT1 determines sex in the ZZ/ZW system. Two copies of the gene—one on each Z chromosome—make a male, whereas one copy of the gene produces a female.

Fruit flies only have one type of sex chromosome that plays a role in sex determination. In this species, sex isn’t determined by a certain combination of chromosomes, but is instead decided by the ratio of sex chromosomes to non-sex chromosomes (called autosomes) in the individual’s genome. Flies with one sex chromosome and two sets of autosomes are males, and flies with two sex chromosomes and two sets of autosomes are female. Geneticists have bred flies with two X’s and three sets of autosomes, creating an ambiguous ratio between the two. In these animals, each individual cell makes its own decision on whether to develop as male or female, and the resulting animal is a mosaic of both types of tissue.

The duck-billed platypus is an unusual critter in many ways, and its sex determination system is no exception. Unlike most mammals, which have a single pair of sex chromosomes, the platypus actually has five pairs of sex chromosomes that form a chain during cell division. Individuals with an XXXXXXXXXX chromosomal arrangement are females, while those with an XYXYXYXYXY arrangement are males. Scientists were surprised to find that while one end of the chain of chromosomes has several genes in common with other mammals, the other end of the chain has the DMRT 1 gene (resembling the sex determining system of birds). It’s possible the platypus may preserve the evolutionary transition between the ZZ/ZW system of birds and the XX/XY system of most mammals.

When sex determination goes awry

Among humans, who have just two sex chromosomes, things seem simple. But the sex determining process in humans isn’t always straightforward either. When chromosomes are being distributed to sperm cells, sometimes an X chromosome accidentally acquires a tiny piece of a Y chromosome containing the SRY. If this SRY-containing X chromosome gets paired up with another X chromosome in an embryo, masculinization will occur. This results in a baby that is physiologically male but has an XX genotype.

The opposite happens too. Occasionally the Y chromosome loses the region containing SRY, or the gene undergoes a mutation that renders the SRY gene nonfunctional. This Y chromosome will not induce masculinization, so upon joining with an X chromosome, a female with an XY genotype results.

Other chromosomal abnormalities also occur, complicating sex further. An embryo can end up with two X chromosomes and a Y chromosome (called Klinefelter’s syndrome) or two Y chromosomes and one X chromosome. Both genotypes will produce males, and in many of these cases, symptoms are rare and a man may never know he has an extra chromosome. However, inheriting too few chromosomes is more of a problem. In Turner syndrome, an embryo inherits just one X chromosome, or inherits one functional X chromosome and another that is highly abnormal. Females with Turner syndrome are generally sterile, and have a myriad of health concerns.

And sometimes, even when a person’s genetics say one thing, their physiology may say another. Hormone disorders can interrupt or completely override normal sex development. For instance, despite having a male genetic makeup, some men are unable to properly use male hormones called androgens. This disorder, called androgen insensitivity syndrome or AIS, prevents male sex characteristics from developing. AIS is due to genetic defects on the X chromosome, and can result in a large spectrum of conditions. AIS males can be simply sterile to some appear completely feminine despite having a Y chromosome.

For the fairer sex, hormones may also complicate things. There are various hormonal conditions in which individuals with two X chromosomes don’t develop normally into females. In some disorders, such as congenital adrenal hyperplasia, extra-large doses of androgen are produced and lead to masculine characteristics. Even external factors, such as testosterone encountered by a mother during pregnancy, can interrupt normal sex development. This can ultimately give female genitalia a distinctively masculine appearance.