Hideki Matsui and the Yankees agreed Tuesday night to a $52 million, four-year contract that will keep the popular outfielder in New York. Matsui's agent, Arn Tellem, and Yankees general manager Brian Cashman met the Nov. 15 deadline contained in Matsui's first contract with the team. That deal stated that if there was no agreement by then, New York would have to place the outfielder on unconditional release waivers, which means the Yankees could not have re-signed him until May 15. Matsui is to earn $13 million in each of the next four seasons, a baseball official familiar with the talks said on condition of anonymity because the team did not disclose the financial terms. Matsui was coming off a $21 million, three-year contract in which he earned an additional $1.5 million in performance bonuses.