# What is best practice to solve least square problem AX = B

Hi, i have a system of linear equations AX = B where A is 76800x6, B is 76800x1 and we have to find X, which is 6x1. I was using X = invert(AT* A) AT* B where AT is transpose of A. But i want to increase the speed of operation and also it dose not protect my calculation under singularity conditions. Is there any faster way to do this.?