I am following the PCA course from Coursera and while the instructor was isolating the beta coefficient from the following equation; $ x_{n} = \sum_{i=1}^{D} \beta_{in}b_{i} $, he ended with $\beta_{in} = x_{n}^Tb_{i}$. My question is, why does the $x_{n}$ becomes $x_{n}^T$ and not $x_{n}^{-1}$? And what happened to $\sum_{i=1}^{D}$?
I'm available to go ahead with the course without knowing what's going on but I really want to understand everything, so I will appreciate your answers so much.
We're missing a lot of context, but here's my best guess at what's going on.
The vectors $b_1,\dots,b_n$ are an orthonormal (perhaps principal components), which is to say that $b_i^Tb_j$ is $1$ if $i = j$ and $0$ otherwise. It follows that for any $i$, we have $$ x_n^Tb_i = b_i^T x_n = b_i^T \sum_{j=1}^D \beta_{in}b_j = \sum_{j=1}^D \beta_{in} \cdot (b_i^Tb_j) = \beta_{in}. $$
The following perspective might be helpful. In terms of matrices, the first equation can be written as $$ x_n = B \beta_n, $$ where $B$ is the matrix with columns $b_1,\dots,b_n$ and $\beta_n$ is the column-vector with entries $\beta_{1n}, \dots \beta_{Dn}$. By obtaining an equation of the form $\beta_{in} = \cdots$, we are solving for the vector $\beta_n$ in the above equation.
Typically, in order to solve the above equation, we would have to "divide both sides by $B$", in a sense. As long as the columns of $B$ are linearly independent, we could proceed as follows: there exists a "left inverse" $C$ of the matrix $B$ for which $CB = I_{D \times D}$, and we could multiply both sides by $C$ to find that $$ Cx_n = CB \beta_n = I\beta_n = \beta_n, $$ which is to say that we have solved for $\beta_n$. Generally speaking, there is no "nice" formula for the entries of $C$; one common generic approach is to make $C$ the MP pseudoinverse of $B$.
In our particular case, we know that the columns of $B$ are orthonormal, which makes it very easy to divide by $B$: we can simply take $C = B^T$. With that, the equation becomes $$ B^TB \beta_n = \beta_n = B^T x_n. $$ Now, each entry of $\beta_n$ is one of the values of $\beta_{in}$, and each entry of $B^Tx_n$ is a dot-product between a column of $B$ and the vector $x_n$. Putting that all together, we see that we have $\beta_{in} = b_i^Tx_n$ for each $i$.