Let $\mathbf{A} = \begin{bmatrix} A_{11} \\ A_{21} \\ A_{31} \\ \vdots \\ A_{N1} \end{bmatrix}$ be a column vector.
The product $\mathbf{A}^\top \mathbf{A}$ (transpose of the column vector multiplied by the column vector) results in:
\[
\mathbf{A}^\top \mathbf{A} = \begin{bmatrix} A_{11} & A_{21} & A_{31} & \cdots & A_{N1} \end{bmatrix} \begin{bmatrix} A_{11} \\ A_{21} \\ A_{31} \\ \vdots \\ A_{N1} \end{bmatrix} = \begin{bmatrix} A_{11}^2 + A_{21}^2 + A_{31}^2 + \cdots + A_{N1}^2\end{bmatrix}
\]
hence $l=\sqrt{A_{11}^2 + A_{21}^2 + A_{31}^2 + \cdots + A_{N1}^2}$
The product $\mathbf{A} \mathbf{A}^\top$ (column vector multiplied by its transpose) results in the matrix:
\[
\mathbf{A} \mathbf{A}^\top = \begin{bmatrix} A_{11} \\ A_{21} \\ A_{31} \\ \vdots \\ A_{N1} \end{bmatrix} \begin{bmatrix} A_{11} & A_{21} & A_{31} & \cdots & A_{N1} \end{bmatrix} =
\begin{bmatrix}
A_{11} \cdot A_{11} & A_{11} \cdot A_{21} & A_{11} \cdot A_{31} & \cdots & A_{11} \cdot A_{N1} \\
A_{21} \cdot A_{11} & A_{21} \cdot A_{21} & A_{21} \cdot A_{31} & \cdots & A_{21} \cdot A_{N1} \\
A_{31} \cdot A_{11} & A_{31} \cdot A_{21} & A_{31} \cdot A_{31} & \cdots & A_{31} \cdot A_{N1} \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
A_{N1} \cdot A_{11} & A_{N1} \cdot A_{21} & A_{N1} \cdot A_{31} & \cdots & A_{N1} \cdot A_{N1} \\
\end{bmatrix}
\]
Trace is the sum of diagonal elements $P=A_{11}^2 + A_{21}^2 + A_{31}^2 + \cdots + A_{N1}^2$
$P=l^2$