"Our thoughts … are with Nelson Mandela and his family, and all of South Africa," Obama said in Pretoria in a televised press briefing.
He said Mandela had been a personal inspiration to him, and it was "great" to see what was happening in South Africa, when so many other regions were divided by conflict and disputes.
"… Seeing people standing up for what's right … I think continues to shine as a beacon [of hope]," said Obama.
The outpouring of love for Mandela had showed what he meant to South Africans and the world, said Obama.
The White House has announced that Obama and US first lady Michelle Obama will meet the Mandela family.
The Obamas will however not visit the "critical, but stable" Mandela in hospital.
"Out of deference to Nelson Mandela's peace and comfort and the family's wishes, they will not be visiting the hospital," said the White House in a statement.
The White House said this would be a private "to offer their thoughts and prayers at this difficult time."
Obama's Marine 1 military helicopter landed at the Union Buildings lawns, accompanied by three other identical helicopters and two smaller ones.
"Where should we stand? Obama said, as they posed for pictures.
Zuma and Obama
Zuma and Obama took part in bilateral talks, which was followed by a joint press briefing. Trade, health, education as well as peace and security were said to be top the agenda.
"We are pleased to be working with you [Obama] today with a common goal of expanding trade and relations between our two countries," said Zuma at the briefing.
"Mr President you are visiting Africa at the right time … We would like to see you invest in the South African economy for mutual benefit".
Youth development is a key focus area, he said.
Michelle Obama and her counterpart in South Africa Tobeka Madiba-Zuma will later have their separate programme until they rejoin the presidents at an official dinner on Saturday evening.
Obama is later scheduled to address young people at the University of Johannesburg's Soweto campus, where he's due to receive an honorary degree from the university.
A large contingency of local and international media, including the White House correspondents, is covering Obama's visit. South Africa is the second country the US president is visiting, in a three-nation tour that ends on Wednesday.
Obama is making his first visit as president to South Africa, a leading African partner in US trade and the fight against HIV and Aids.
Obama has called Mandela a "personal hero" and said the imprisoned activist's willingness to risk his life for the cause of equal rights helped inspire his own political activism. Obama said his message during the visit will draw on the lessons of Mandela's life, with a message that "Africa's rise will continue" if its people are unified instead of divided by tribe, race or religion.
"I think the main message we'll want to deliver if not directly to him but to his family is simply a profound gratitude for his leadership all these years and that the thoughts and prayers of the American people are with him and his family and his country," Obama said on his flight into the country.
Obama will be only about a 10-minute drive from the Pretoria hospital where 94-year-old Mandela lies in critical condition, but the president indicated he's not angling for a visit but instead is grateful that he, his wife and daughters had a chance to meet him previously. Obama hangs his photo of the introduction he had to Mandela in 2005 in his personal office at the White House – their only meeting, when Obama was a senator.
'No, you can't Obama'
?"I don't need a photo op," Obama said. "The last thing I want to do is to be in any way obtrusive at a time when the family is concerned about Nelson Mandela's condition."
Obama also is paying tribute to the fight against apartheid by visiting Soweto township Saturday afternoon for a town hall with students at the University of Johannesburg. At least 176 young people were killed there 27 years ago this month during a youth protest against the apartheid regime's ban against teaching local Bantu languages. The Soweto uprising catalysed international support against apartheid, and June is now recognized as Youth Month in South Africa.
The university plans to bestow an honorary law degree on the US president, while protesters are planning demonstrations against US policy on issues including the US detention center at Guantanamo Bay, Cuba, the war in Afghanistan and global warming. Hundreds marched to the US Embassy on Friday, carrying signs that read: "No, You Can't Obama," a message inspired by Obama's "yes, we can" campaign slogan.
Obama, the son of an African man, has been trying to inspire the continent's youth to become civically active and part of a new democratically minded generation. Obama hosted young leaders from more than 40 African countries at the White House in 2010 and challenged them to bring change to their countries by standing up for freedom, openness and peaceful disagreement.
Obama wraps up his South Africa stay Sunday, when he plans to give a sweeping speech on US-Africa policy at the University of Cape Town and take his family to Robben Island to tour the prison where Mandela spent 18 years. – Additional reporting by Sapa and AP.