There has also been a cash adjustment of £3.5m in West Ham's favour.
"I can confirm that the transfer has been completed and we welcome Matthew to Upton Park," says MD Paul Aldridge.
"We also wish Fredi the best of luck at his new club."
Rumours that everything was settled on Monday night are wide of the mark, and Paul explains: "Those stories were premature and it was all only tied up today - otherwise Matthew would not have been able to train with us and we would not have allowed Fredi to train at Tottenham."
Matthew, who will be 22 later this month, joined Spurs from Barry Fry's Peterborough for £500,000 in 1999 and has made 51 appearances for Tottenham, scoring on two occasions.
Fredi's season was severely curtailed by injuries last season, and, shortly after his return to action after a long lay-off, he was sent off at Leeds, and suspended as a result.
With Les Ferdinand having chosen to go to Leicester in the summer, and Paolo Di Canio having been given a free transfer, not to mention Trevor Sinclair, who sometimes played up front, having been transferred to Manchester City, Glenn's priority now that Fredi's departure has been sealed as well is to bring in a centre forward.
Truro-born Matt, who won his first England under-21 cap against Slovenia in February 2002, is an attacking midfielder who can also play wing-back, and spent a spell on loan to Bradford City in 2001, where he played 13 games.
He started at Peterborough as a trainee in July 1997, having already made his first team debut as a schoolboy; he turned professional in August, 1998, and made his Spurs debut against Liverpool at Anfield in April 2000.