Francois Hollande was given a tour of Banff National Park by Prime Minister Stephen Harper and made note of the deaths of the soldiers, who were killed last month in separate incidents in what police have described as terrorist attacks.
Cpl. Nathan Cirillo was shot dead by a gunman in Ottawa. Warrant Officer Patrice Vincent was killed and another soldier injured when they were run down by a vehicle in Montreal.
"I want to express all of France's solidarity with the families of the victims tragically murdered in those terrorist attacks that caused such grief to your country," said Hollande.
"There have also been tragic acts here and I'd like to extend to you, dear Stephen, the full friendship of France in these circumstances. In other moments, not so far in the past, we were also touched by such dramatic acts," he said in French.
Harper and Hollande had plenty of time to chat on their 90-minute drive to Banff from Calgary.
"We continue to work, Francois and I together, on issues as diverse as international peace and security, obviously international economic situation, the pandemic problems we're having, the battle against climate change, all of these things France as a country is truly in the forefront of what's going on in the world," Harper said.
The two men spent a few minutes on the Rundle Terrace with a view of Mount Rundle and Tunnel Mountain, with the prime minister pointing to areas of interest.
Hollande reviewed a 100-member Canadian Forces honour guard. A military band played "O Canada" and "La Marseillaise," the French national anthem.
Hollande told Harper it was a pleasure to be the first French president to make an official state visit to this country since 1987, calling Canada a "great friend".
"I'm also here as part of our excellent bilateral relations, because we are two countries that were made friends by our history, culture, language and the same concept of development," Hollande said.
"Canada is attached to bilingualism. We share the sensitivity and elegance that comes each time we express ourselves in French. It's a skill to speak two languages, like you do in Canada."
Governor General David Johnston paid tribute to the close ties Canada and France have developed in a speech at a state luncheon at the Banff Springs Hotel.
"Our ties are strong but the challenges we face are many," said Johnston.
"We must avoid complacency. Through dialogue and a shared commitment to working and innovating together, I am certain we can strengthen our partnerships and create new avenues of prosperity."
Hollande will also address Parliament and is also scheduled to visit Montreal and Quebec City.
The last French president to make a formal state visit to Canada was Francois Mitterrand in 1987, although Nicholas Sarkozy attended a European Union-Canada summit in 2008.
Hollande will be accompanied by several cabinet ministers and a large business and academic delegation.
France is Canada's eighth-largest commercial partner, with bilateral merchandise trade totalling more than $8.5 billion in 2013.
The French president also met with Alberta Premier Jim Prentice and Bob McLeod, the premier of the Northwest Territories.
"This visit is as historic as it is valuable given the long-standing friendship between Alberta and France that begins with our cultural roots," said Prentice.
"Market access continues to be the most pressing issue facing the province and today we took a significant step on this front with the signing of a letter of intent between Alberta and (France's) Ministry of Agriculture."
Follow @BillGraveland on Twitter