In October 2015, the astronomer Geoff Marcy stepped down from his tenured professorship at the University of California, Berkeley, after Buzzfeed revealed that the university had found him guilty of sexually harassing undergraduate students over two decades. More recently, the California Institute of Technology suspended the astronomer Christian Ott for “gender-based harassment” after two Title IX complaints that graduate students had filed against him were judged valid. And in February, the molecular biologist Jason Lieb resigned from the University of Chicago after a committee investigating sexual misconduct charges concluded that he should be fired.

As these events have played out in very public ways, astronomers—and the broader scientific community—have begun talking more about how to foster a supportive, welcoming environment for female scientists. But although these issues are now being discussed in new ways, they are not new: Gender identity and sexual relations have long been key forces shaping scientific careers for both men and women.

In the 17th century, male astronomers and other scientists began to forge home-based models for producing scientific knowledge, conducting their research independent of universities. In doing so, they followed the pattern in the pre-industrial economy more generally, in which economic production was centered around the household, with all members of a family contributing to the business. In 17th-century London, for example, a printer would often run both a printing press and a retail book shop out of his home; his family members would participate in all aspects of the business, selling and printing books, keeping accounts, and managing apprentices and journeymen. In historical business records, these family members would become visible only when the patriarch died: Until then, it was his name that would typically stand on all the guild records and contracts.

In the same way, women of the time were plenty active in scientific research, but as wives, daughters, and sisters, working with and assisting male scientists who received most (if not all) of the public credit for the work of the family. For example, Margaret Flamsteed, the wife of John Flamsteed, Britain’s first Astronomer Royal, studied mathematics with her husband, worked occasionally as his assistant, and, after his death, published a stellar catalog and atlas using the data that she, her husband, and various other assistants had collected. This research played a crucial role in establishing methods for accurately calculating longitude at sea. And the 18th-century astronomer Caroline Herschel, who built telescopes and discovered or co-discovered eight comets and many nebulae, published in her own name and earned a salary as an astronomer; even so, she always presented herself as her brother’s assistant.

For men, family life was also the foundation of a scientific career, but in a more public way: Men inherited contacts, financial resources, and even specific jobs from their fathers. For example, the men of the Cassini family dominated at the Paris Observatory through the 17th and 18th centuries, handing down the position of observatory director through four generations. John Herschel, the son of Caroline’s brother William, followed his father and his aunt into astronomy, making important contributions in mapping double stars and calculating their orbits.

Men also maintained the gender-based hierarchies of their households through astronomy and mathematics. When the diarist and naval administrator Samuel Pepys, a contemporary of Flamsteed’s, feared his wife was straying from him—she spent entirely too much time with her dancing master, he thought—he cut off her dancing lessons, bought a pair of globes, and began tutoring her in mathematics. And in The Young Gentleman and Lady’s Astronomy, first published in 1768 and reprinted widely in Britain and American through the early 19th century, the popular science lecturer James Ferguson communicated astronomical principles through a series of imagined dialogues between a brother and a sister. In Ferguson’s stories, the brother, a student named Neander on break from his Cambridge studies, instructed his sister Eudosia in astronomy each morning after breakfast.

When Eudosia expressed a desire to further pursue her scientific studies at a university, Neander responded that there was no need for a university for ladies. Their brothers, fathers, and husbands, he said, should take on the responsibility of instructing them, giving them a means of occupying their time in sensible, rational ways. Fortified with astronomy, Neander continued, “how much better Wives, Mothers, and Mistresses they would be, is obvious to the common sense of mankind.”

Through these stories, Ferguson neatly tied astronomy to a man’s authority over his female relatives. He also impugned the masculinity of men who thought astronomy was beyond women: If men failed in teaching their female relatives science, he said through Neander, it was only because they didn’t want to betray their own scientific ignorance. Though there were no boundaries between what men and women might know, his characters agreed, there was one acceptable direction for knowledge to flow—from men to women—and there was a firm division between public (male) and domestic (female) worlds. When Neander declared that he wanted to publish a version of their domestic conversations, in part to make these hierarchies clear, Eudosia insisted that he remove her name, for modesty’s sake.

In the 19th and 20th centuries, (mostly male) scientists developed a new model for organizing scientific labor. Science moved from the home to the research university, a space in which women were not generally welcome. In this, scientists one again participated in wider societal transformations, as industrialization drove labor out of the home and into the factory, creating a new division between “work” and “life.” Writing about particle physicists in the 1980s, the anthropologist Sharon Traweek observed that as graduate students, young scientists noted and absorbed the approved sexual mores of their communities: For male scientists, a successful career was anchored by an early marriage to a wife who would run the family, leaving him free to pursue his life in science.

Even here, though, women astronomers made a place for themselves. In the early 19th century, they often worked as “computers,” analyzing data collected by their male peers. Studying telescopic data recorded on photographic plates taken at the Harvard College Observatory, Henrietta Swan Leavitt discovered the period-luminosity relationship that defines the stars known as Cepheid variables: Their brightness varies at a regular rate that correlates to their overall luminosity. This discovery led to one of the major advances of the 20th century, the measurement of the physical size and age of the universe.

Female astronomers, however, were often barred from observational work—women were not permitted to join male astronomers at night in the domes that housed the Harvard College Observatory’s telescopes. And in order to pursue work as computers, women were expected to sacrifice marriage and family life (assuming they desired it).

Through the 20th century, though, male and female scientists formed domestic partnerships in which the work of both partners was integral to the production of scientific knowledge. The science historian Megan Shields Formato notes that the physicist Niels Bohr, for example, relied upon his wife Margrethe to organize and edit his writing as he drafted the papers that defined quantum mechanics.

In the mid-20th century, the astronomer Vera Rubin established the existence of dark matter through her research into galactic rotation speeds. Rubin’s career was shaped in important ways by her family life: With young children, traveling to telescopes was difficult, if not impossible—not to mention that, as a woman, she was shut out from  most American observatories. So she chose approaches to problems that involved analyzing existing data in creative ways. Yet these domestic constraints also helped her to see things that other scientists didn’t, like the evidence for dark matter. Through all this, Rubin describes her husband Robert Rubin, a physicist, as “an enormous support.” They shared ideas and professional contacts and talked through problems together, a partnership what was both domestic and scientific.

Similarly, the astrophysicists Margaret and Geoffrey Burbidge made a marriage out of scientific and domestic collaboration. They met in the 1940s, when Geoffrey started graduate school at the University of London, where Margaret ran the university observatory. Together, they went on to make key breakthroughs in astrophysics, raised a daughter, and co-founded the astrophysics program at the University of California at San Diego.

Two things are clear. One, that women have long found ways to participate in astronomy, though their contributions have often been hidden under a male name. Two, male careers in science are shaped just as much by gender as women’s have been. Over the centuries, the movement of research from home-based production to universities and corporations has required scientists to  negotiate and renegotiate questions of who contributes to the production of scientific knowledge, and how. The history of astronomy suggests that if the goal is to achieve true gender equality in the field, then men, as well as women, have to understand how sex and gender structure their work.