The two surnames
When a child inherits a name from each parent, the record doubles — and so does the problem of tracing it forward.

A name from each side
Most European surname systems were built on a single line. You took your father's name; your mother's disappeared into it. But several traditions — Spanish, Portuguese, Catalan, and across Latin America — formalised something different: a child receives two surnames, one paternal, one maternal, carried in that order. In Spanish practice the primer apellido is the father's first surname, the segundo apellido the mother's first. A child named García López has a García from the paternal line and a López from the maternal one.
The system is tidy in its own logic. At marriage, neither partner traditionally changed their surnames. A woman who was Martínez Ruiz before the ceremony remained Martínez Ruiz after it. What changed was the surnames passed on: she contributed her first surname to any children, and so did her husband. The household names did not merge; they were selected from.

This means the surname a child carries already encodes two lineages, not one — but only one generation deep on each side. The maternal grandmother's maiden name vanishes from the child's record in the next generation, replaced again by the mother's first surname. Each generation, one name survives forward and one is shed. The record broadens and narrows at the same rhythm.
What this does to the record
For anyone tracing a woman through the records, the double-surname system is immediately friendlier than the single-name tradition. A woman's identity does not dissolve at marriage; she appears in parish registers, civil records and census columns under her own surnames throughout her life. The point of loss is elsewhere — it is the segundo apellido that becomes harder to follow, because it is not the name most often cited.

Civil registration formalised the pattern in different countries at different moments. Spain's civil registry, introduced in 1870, required both surnames to be recorded at birth. Portugal followed its own trajectory; parts of Latin America maintained the custom through colonial and post-colonial administration with local variations in ordering and in which parent's first or second surname was passed on.
What the double system never fully solved was the problem of transmission across international borders. When families emigrated and records were kept in a single-surname tradition — as in most of the English-speaking world — one of the two names was routinely dropped, and the documentary link snapped. The record that had been generous became, at that crossing, as thin as any other.