The deal for Dias is worth an initial £62m, with a further £3m subject to add-ons, and was confirmed in a statement from Benfica on Sunday night.
In the statement, the Portuguese club said they had agreed a separate fee of 15m euros (£13.6m) to sign Otamendi.
Dias, who becomes City’s third signing of the summer following the arrivals of Nathan Ake and Ferran Torres, has signed a six-year deal at the Etihad, where he will wear the No 3 shirt.
Dias has impressed during three seasons at Benfica and was in Portugal’s 2018 World Cup squad.
The 23-year-old scored and captained the side in Benfica’s 2-0 win over Moreirense on Saturday, after which he was pictured hugging the club’s sporting director Rui Costa.
City director of football, Txiki Begiristain, added: “Ruben is a player we have admired for some time and we have been impressed with how he has progressed at Benfica.
“He has developed into a real leader and as a defender, he has all the attributes we are looking for. He is strong in the air, good in one v one situations and technically, he is very good, so we are confident he can thrive in our system.
“He is young, but has experience playing for a top European club in Benfica and we’re really pleased we’ve been able to sign him.
“He is another talented addition to the squad and someone who is only going to get better working under Pep.”