I have a matrix $A_{n\times m_1}$ and $B_{n\times m_2}$ where $n < m_1 \text{ and } n < m_2$ I need to find $T$ such that $\underset{T}{argmin} ||A T - B||$.
If $n > m_1 \text{ and } n > m_2$, then it is easy: $A T = B \rightarrow (A^T A)^{-1}A^T A T =(A^T A) A^T B \underset{(A^T A)^{-1}A^T A = I}{\rightarrow } T = (A^T A) A^T B$
but if $n < m_1 $, then $(A^T A)^{-1}$ does not exist.
how can I solve my problem?