An 11-year-old Herndon girl died yesterday after initially surviving the slayings of her mother and brother and the suicide of her father, who authorities now say had defrauded area banks of nearly $2 million and had $10 million in gambling and other debts.

Reha Ramachandran was grazed by a bullet that struck the back of her head as her father, Natarajan Ramachandran, killed his wife and 7-year-old son Sunday night. Reha died yesterday afternoon at Inova Fairfax Hospital after her brain swelled as a result of the injury.

Sources familiar with the investigation said that before his death, Ramachandran had written nearly $2 million in bad checks in an attempt to cover mounting debt totaling more than $10 million, some of it from gambling losses at Atlantic City casinos. He had been under investigation by the FBI and had been interviewed several times by agents who were building a case against him, a source said.

"It is a sad day when the love of money and the fear of failure drives a man to destroy his entire family," said Lt. Bruce Guth, a Fairfax County police homicide investigator.

Ramachandran was writing checks on several bank accounts, all with insufficient funds, authorities said. The time it took for checks to clear between accounts in the different banks allowed Ramachandran to stay one step ahead of being caught, authorities said.

"Our case concluded at the time he killed himself and will subsequently be closed," said John L. Barrett Jr., special agent in charge of the criminal division in the FBI's Washington field office.

Authorities said Ramachandran's business partner, Nagaraja Thyagarajan, became aware of the financial problems and went to Ramachandran's home in the 12300 block of Clareth Drive at 12:45 p.m. Monday to discuss the matter. When Thyagarajan knocked at the door, Reha, shaken, disoriented and bleeding from a bullet wound, answered the door.

She was admitted to Inova Fairfax Hospital, and her condition improved somewhat Tuesday -- she even spoke with police -- before she died of complications yesterday.

Fairfax County police said Reha told them that after being shot, she somehow thought it was all "just a bad dream." She said she stumbled from the master bedroom, where Ramachandran had gathered the family, into another room and fell asleep until she was aroused by Thyagarajan's knock at the door.

Autopsies performed yesterday on Ramachandran; his wife, Kalpara, 36; and son, Raj, determined that they died of gunshot wounds to their upper bodies.

Sources said Ramachandran left a note detailing his financial problems. They said his wife was not aware of his financial difficulties.

Records from New Jersey Superior Court show three judgments for an Atlantic City hotel and casino against Ramachandran, who apparently also used the name Nat Ram there. The judgments, in 1991 and 1992, totaled $2,240.

Ramachandran worked for Universal Finance Solutions, a Vienna investment firm that he founded with Thyagarajan. Ramachandran and Thyagarajan paid $252,000 in cash for the office condominium in a low-rise building on Gallows Road, according to land records and the previous owner of the property.

Thyagarajan has declined to comment on the case.

Ramachandran and his wife bought their Herndon home, with four bedrooms and 4 1/2 bathrooms, for $585,000 in April 1997, with a mortgage of $438,800. The house sits on an acre amid only 10 other homes in a subdivision called Crossfields. The family had not sold its previous home in Prince William County. It was purchased in July 1989 for $170,400. County land records show the couple had a $153,350 mortgage on that property, and an additional loan in October for $15,700. Staff writer Erica Beshears contributed to this report. CAPTION: Reha Ramachandran's brain swelled after she was grazed by a bullet.