Do synonyms always have the same gender
For example: dog in Portuguese can be translated as "cão" or "cachorro". Is it a coincidence that they are both masculine, or would two different words for the same noun always have the same gender?
No, thats a coincidence. Synonyms dont exactly need to have the same gender. Language = O idioma / A língua. So, it depends on the gender of the word
Cheers for that. I guess that means the assignment of gender to a noun must be relatively arbitrary.
Generally speaking, that's true of all languages that use gender. Linguistically speaking, gender is a classification system, not some way of saying that tables and forks have feminine qualities.