The County Durham schoolboy, who was 12 when he carried out the assault in November 2004, admitted rape and theft at an earlier hearing.
Teesside Crown Court heard the attack took place after a one-to-one teaching session at an educational establishment in the region.
After the rape, he drove the woman's car away and dumped it on Tyneside.
Mental scars
Mr Justice Grigson ordered the teenager, who cannot be named, should be detained for life, and placed on a sex offenders register indefinitely.
Sentencing him, the judge added: "These problems are not of your own making, but it is plain that until these problems are dealt with you are very likely to commit other offences, other offences as serious as this.
"So the public has to be properly protected until such time as your problems have been assisted."
Hopefully there will come a time when he is no longer the risk he currently is
John Evans, defending
The judge told the boy he must serve at least 21 months detention but that it was likely he would serve much longer.
He told the defendant that the woman's mental scars would take a very long time to heal.
Mr Justice Grigson said: "You know that better than anybody - you were the victim of such an attack.
"Despite your very young age, it is quite clear that you knew what you were doing."
Inquiry launched
John Evans, defending, said his client had been the victim of sexual and physical abuse from a very young age.
By the age of three-and-a-half, concerns were being expressed about the boy's sexualised behaviour, he said.
"By 1995, when this boy could not yet have been four, he was being mistreated and indeed encouraged to engage in misuse of alcohol and cigarettes," said Mr Evans.
"Some might say that the signs were already there and that he was being significantly let down.
"Hopefully there will come a time when he is no longer the risk he currently is and can be released back into the community."
After the hearing, child welfare experts responsible for the teenager's care said they had launched an immediate inquiry.
A British boy has been ordered to be detained for life for the rape of his teacher. He was just twelve years old when he attacked the teacher in County Durham last November.

The Crown Court heard that the boy had attacked the female teacher after a one-to-one session, and then drove the teacher's car away from the scene before abandoning it thirty miles away.

The boy, who also suffers from learning difficulties, admitted to the rape in court.

The defence told the court how the boy had been the victim of sexual abuse since he was very young. At just three and a half, concerns had been raised over his 'sexualised' behaviour. By four, he had been encouraged to experiment with alcohol and cigarettes. 

But judge Mr Justice Grigson told the boy: "Despite your very young age, it is quite clear that you knew what you were doing." 

The judge told the boy that he must serve at least 21 months of his sentence but will most likely be behind bars for much longer. He will also be on Britain's Sex Offender Register for all of his life.

The agencies which should have protected the boy in his early life have launched an enquiry into their failings.