In projects in California and Boston, BankAmerica Corp. and Citicorp, the nation's two largest commercial banking companies, are trying to demonstrate how banks can become involved in building low- and moderate-income housing in the inner city for a profit.

The companies are constructing rental housing and selling rehabilitated units. The amount of private capital invested ranges from none to 100 per cent.

In Boston, Citicorp Community Development Inc. holds an 80 per cent interest in a development operation called Mission Park Corp. The remaining interest is held by Harvard University. The corporation was set up to construct and run 775 federally funded apartments in the Mission Hill/Roxbury section, a section that has experienced racial tension and some violence in the past decade.

Thirty percent of the complex, which is located near a Harvard medical center, is reserved for people with very low incomes and members of minority groups.One building is for the elderly, and 15 per cent of the complex is reserved for tenants who will pay the full market rate.

The $41 million project is scheduled for completion in 1978. Mission Park Corp. will continue to operate the complex for the life of the 40-year mortgage, according to a Citicorp director, John Dewey. That will make Citicorp a major landlord in Boston.

In California, the Bank of America's City Improvement and Restoration Program (CIPR) has undertaken to buy, rehabilitate and resell dilapidated housing in Oakland, with the cooperation of community leaders. The corporation buys units for about $2,000 each, hires contractors to rehabilite them for about $15,000 a unit, and then sells the units to individuals at a small profit. There are no public funds involved.

While this operation tends to take low-income housing off the market, it also helps control steep inflation of prices in heighborhoods under rehabilitation, corporation spokesmen said. Speculators are not allowed to buy the units, they pointed out.

The restoration group has also signed an agreement with the San Jose, Calif., city government which maintains residential zoning in a 30-block area adjacent to San Jose State University where the bank is offering 90 per cent loans of up to $50,000 for home buyers who are willing to undertake rehabilitation of their units. Borrowers can also get mortgage and home improvement loans at their mortgage rates; banks normally higher interest for home improvement loans.

In 1972, at a time when many bank holding companies were deeply invloved in real estate investment trust, the Federal Reserve ruled that real estate development was not a permissible activity for them. These companies had to write off millions of dollars in bad loans when the housing industry went into a decline.

Since the recovery the Fed Reserve has permitted banks limited participation in property transactions for their own accounts. The Fed permits equity and debt investments for specific projects, provided that they are such public-spirited projects as low-and moderate-income housing and parks. The investment must not be a major part of the bank holding company's business.

The Bank of America is also administering government funds earmarked for residential rehabilitation under the Community Development Block Grant program. When it was discovered that San Diego's lack of staff and expertise in making and servicing the loans was delaying distribution up to a year, the bank company's restoration offshoot offered to take over the banking functions.

In exchange for screening loan condidates and collecting payments, the city places its rehabilitation funds in a non-interest bearing account. The bank is allowed to keep the interest payments, while the principal is returned to the city as the loan is paid off.