There are two cases when the past participle must agree in both gender and number in French. The first is when we use être as the 'auxiliary verb'. If we were to say, 'this man died', in French we would say 'Cet homme est mort'. Note that the past participle, 'mort' is singular and masculine (there is nothing put on the end). If there were several men who died, 'mort' would change to 'morts' because the subject (hommes) is plural. However, if we wanted to say 'lots of women died', we would translate this by saying 'beaucoup de femmes sont mortes'. This is because 'femmes' is a feminine and plural noun. To make a past participle agree with a feminine subject, we put an 'e' on the end, and to make it plural, we put an 's' on the end, resulting in 'mortes' as opposed to 'mort'. Note that the 'e' and the 's' are always in this order.The second case where agreement of the past participle occurs is sneaky! It occurs if there is what is called a 'preceding direct object', or a PDO for short. Knowledge of these grammatical terms isn't important, but recognising them is. This kind of agreement occurs when we have 'noun + que + passé composé'. An example in English would be 'The book that I have read...' or 'The letters that I have written...' followed by the remainder of the sentence. To say 'the book that I have read' in French, we would say 'Le livre que j'ai lu', which is what we would expect. However, we would translate 'The letters that I have written' as 'Les lettres que j'ai écrites'. Notice that the past participle of écrire, écrit, has additional letters, 'e' and 's' on the end.' This is because 'lettres' is a feminine and plural noun that comes before 'que' and a phrase in the passé composé. By extension, this rule applies to any compound tenses with avoir as the auxiliary verb - for example, 'The letters that I had written' would be 'Les lettres que j'avais écrites'.