Why is the following function an affine function? $$f(x)=(P^{1/2}x,c^\top x)$$ I learnt that affine functions have the pattern like $f(x)=Ax+b$, is there any relation between the two function?
Maybe I got it.
Suppose $A = (P^{1/2},c^\top)^\top$, $A(x,0)^\top=(P^{1/2}x,c^\top x)$
So $f(x)=(P^{1/2}x,c^\top x)=A(x,0)^\top$ conforms to the pattern of affine function.
Is that right?
Definition: A function $g:\ R^n\ \longrightarrow\ R^m$ is affine if it is of the form $$g(x)=Mx+v$$ for some matrix $M\in\operatorname{Mat}(n\times m,R)$ and vector $v\in R^m$.
Given a pair of matrices $A,B\in\operatorname{Mat}(n\times n,R)$, the function $$f:\ R^n\ \longrightarrow\ R^{2n}:\ x\ \longmapsto\ (Ax,Bx),$$ satisfies $f(x)=Cx$ for all $x\in R^n$, where $C\in\operatorname{Mat}(n\times2n,R)$ is given by $$C:=\begin{pmatrix}A\\B\end{pmatrix}.$$ Hence $f$ is indeed an affine function, with $M=C$ and $v=0$ in the definition above.