Earlier the Pentagon said the missile had flown for about 1,000km (620 miles) before falling into the Sea of Japan.
The launch, early on Wednesday, is the latest in a series that have raised international tensions.
North Korea’s last ballistic missile launch was in September and came days after its sixth nuclear test.
Mr Mattis was speaking at the White House as he briefed US President Donald Trump and senior officials on the missile launch.
“It went higher, frankly, than any previous shots they have taken,” he said, adding that the North was building “ballistic missiles that threaten everywhere in the world”.
South Korean news agency Yonhap said that the missile was launched from Pyongsong, in South Pyongan province.
Japanese government officials said the missile travelled for about 50 minutes but did not fly over Japan, as some have done in the past.
President Trump was briefed while the missile was still in the air, the White House said. Afterwards he said: “We will take care of it.”
South Korean President Moon Jae-in later spoke to President Trump as they reaffirmed their “strong condemnation of North Korea’s reckless campaign”, the White House said in a statement.
The two leaders said the North’s latest missile test “underscores the grave threat” posed “not only to the US, but to the entire world,” the statement added. (Courtesy BBC)