# 3D to 3D correspondence norm derivation

I've been going through a set of slides about a modified version of the Procrustes problem. The whole problem is described by trying to find a transformation that satisfies $$A_i = sRB_i + T$$ where $$R\in SO(3), T\in R^3,s\in R^+$$ Meaning that R is a rotation matrix and T stands for translation. The scaling parameter $$s$$ is omitted. $$A_i$$ and $$B_i$$ and known point correspondences. This is formulated as the following minimization problem.

$$\min_{R,T}\sum_{i}^N \lVert A_i -RB_i + T\rVert^2$$

The slides says that after differentiating for $$T$$ we obtain

$$T = \frac{1}{N}\sum_{i}^NA_i-R\frac{1}{N}\sum_{i}^NB_i = \overline A-R \overline B$$ Where $$\overline A$$ and $$\overline B$$ are so called centroids. Two centroids are then subtracted from the problem as follows $$\min_{R}\lVert A -RB\rVert_F^2$$ where $$A=(A_1-\overline A, ...,A_n-\overline A)$$ and $$B=(B_1-\overline B, ...,B_n-\overline B)$$. I have two questions related to this:

1. How did they obtain the derivative for T?
2. Why is the $$T$$ in the original $$\min_{R,T}$$ with a plus sign? I would expect something like $$\min_{R,T}\sum_{i}^N \lVert A_i -(RB_i + T)\rVert^2$$ as in trying to minimize the differences between the projected point and its correspondence.