President Reagan signed into law yesterday the Gramm-Rudman-Hollings legislation mandating a balanced budget in six years, warning that the "tough work of controlling federal spending still lies ahead" and telling members of his Cabinet that they must make $50 billion in domestic spending cuts for next year.

Sources said that more than half the cuts are proposals made last year by then-Office of Management and Budget Director David A. Stockman, including the termination of programs such as the Small Business Administration and the Economic Development Administration, and deep cuts in aid to students, governments and federally subsidized housing programs.

White House chief of staff Donald T. Regan told Cabinet members at a breakfast session yesterday that they could not appeal the spending cuts for their departments unless they produce cuts of equal size to offset those prepared by OMB Director James C. Miller III.

According to participants in Regan's Cabinet breakfast, the chief of staff warned that the budget process is a "zero sum game," meaning that Reagan is determined to wring $50 billion from domestic spending in the budget he presents to Congress in January. The president's signature on the legislation also clears the way for the government to continue financing its operations. Provisions raising the $2 trillion debt ceiling were attached to the budget legislation and passage was necessary to avoid a government default.

After months of contentious debate, Reagan signed the bill into law in a surprisingly low-key manner. Although aides had said Wednesday a full-fledged ceremony was planned, none was conducted and Reagan signed the bill privately, issuing only a written statement about it. Asked why there was no ceremony, White House spokesman Larry Speakes said it was "no big deal."

The legislation would set deficit targets each year leading to a balanced budget in fiscal 1991. The target for next fiscal year would be $144 billion, compared with current administration predictions of a deficit of $194 billion without further action. If Congress and the president in any year fail to meet the target, a series of automatic, across-the-board budget cuts would be imposed on most government programs.

In his written statement yesterday, Reagan again said he will not resort to tax increases to meet the budget targets and said he would ask Congress to stick with previous commitments on defense spending. "I am confident that implementing our previous agreements with Congress for steady real growth in defense will keep our defenses secure," he said.

Reagan earlier this year agreed with Congress on Pentagon budget authority that would not increase over the rate of inflation for this year, and 3 percent growth above inflation for the next two years. The zero-growth budget would be $302 billion in spending authority.

But the automatic cuts expected this year as a result of Gramm-Rudman-Hollings, and the omnibus spending bill under deliberation, are expected to reduce that by about $20 billion in spending authority, which reflects policy commitments. Actual military spending tends to lag behind the authority because of installments on procurement contracts.

Officials said yesterday that Reagan would seek to make up for the cuts this fiscal year in the new budget request for fiscal 1987, which is to be submitted to Congress in early February.

On taxes, Reagan said yesterday that "increasing taxes is not an option: deficit reduction must mean spending reductions." However, many members of Congress and outside specialists have said the president has made a tax increase more likely by committing himself to the deficit-reduction bill.

Reagan, who had backed the balanced-budget legislation despite serious misgivings among his senior foreign policy advisers, said that "deficit reduction is no longer our hope and goal -- deficit reduction is now the law . . . . For years the Congress has talked about the deficit and now it has done something about it."