It's being sold as "tandem housing" -- two people, or two families, buying a single-family house. More people are trying it, because they can't afford a house on their own incomes, and because they think that it is better to own half a house than it is to rent.

Real estate agents say that tandem buyers generally fall into one of these categories:

* They're divorced mothers with children who can't afford their own house in a community with good schools.

* They're single, and starting to think that they'll never crack the housing market on their own incomes.

* They're widows or widowers, living alone in a house they can not afford to keep by themselves.

Many unmarried couples buy houses together, as part of their joint commitment. But tandem housing is interesting purely as a business deal, with no romantic entanglement. As an investment, in fact, it's probably safer without the romance.

A few builders -- especially in urban Texas and California -- are testing the market for houses designed for tandem buyers. "Instead of building a major and minor bedroom suite, we build two master suites," says Rodney Friedman, a partner in the San Francisco firm of Fisher-Friedman. "The houses aren't any larger. We just redistribute the space."

He thinks that such houses will appeal equally well to single-family buyers, but adds that the resale value of tandem homes has not been tested.

Would-be tandem owners should sit down with a lawyer before they sit down with a real estate agent, to talk their whole investment through.

"I ask them to consider things they might not have thought about, so that they will each start out with the same expectations," says New York attorney Stephen Raphael of Raphael and Marcus. "Then I suggest that they put their agreements into a written letter of intent, which will be formalized by contract when they actually buy a house." Some contractual points to cover:

(1) How will the house be owned? If you own it jointly and you die, your partner gets your share automatically, no matter what it says in your will. If you own as tenants-in-common, however, you may leave your share of the house to anyone you like.

(2) What if you want to sell? The housemate usually gets first shot at buying out your interest, on financing terms provided in the contract.If your partner does not want to buy, your share will probably be hard to sell.

You might consider owning inexpensive insurance policies on each other's lives. If your partner dies, you could use the insurance proceeds to buy his share.

(3) What if your partner cannot pay his share of the mortgage and upkeep? You should keep a bank account with a two or three-month cushion, to cover the possibility of unemployment, and buy disability insurance, in case you become too ill to work. If you find yourself forced to pay your partner's share, and then he or she does not repay, the contract should provide that your equity ownership in the house goes up.

(4) Where love is involved, the contract should specify that the house will be sold if the romance cools. "Otherwise, the couple might use the house as part of their war against each other, just as married people do," Raphael says.

(5) How much are you each putting down? If one partner makes little or no down payment, it will be easier for that person to walk out, leaving you with all the expenses.

(6) Will the bank let one partner buy the other out, without requiring that the mortgage be renegotiated?

There are many other things to be included -- like who can move in, and how the bills will be paid. Tandem buying can work, but only if you're both comfortable with the agreement before you start.