Question: Given an $n \times n$ matrix $A$, we can define a linear transformation $T: \mathbb{R}^n \rightarrow \mathbb{R}^n$ by $T(x)=Ax$.

We could also define a bilnear function $T: \mathbb{R}^n \times \mathbb{R}^n \rightarrow \mathbb{R}$ by $T(x,y) = y^TAx$.

Is there a relation between these two uses of the matrix?

Also, we could do the same thing with an $n \times m$ matrix and get a linear function $\mathbb{R}^m \rightarrow \mathbb{R}^n$ and a bilinear function $\mathbb{R}^m \times \mathbb{R}^n \rightarrow \mathbb{R}$. Is the relationship between using $A$ to define a linear function versus a bilinear function the same in this case?

Answer: 
Redefining symbols to avoid ambiguity: $T: \mathbb{R}^n \to \mathbb{R}^n$ is the linear map defined as $T(x) = Ax$ and $S: \mathbb{R}^n \times \mathbb{R}^n \to \mathbb{R}$ is the bilinear map defined as $S(x, y) = y^T A x$.

---

**Constructing bilinear functions from linear functions using inner product**

One way to understand $S$ is as composition of $T$ with the standard inner product $\phi: \mathbb{R}^n \times \mathbb{R}^n \to \mathbb{R}$ defined as $\phi(x, y) = y^T x$, namely

$$
S(x, y) = \phi(T(x), y).
$$

This view allows us to notice some properties of $S$ based on properties of $T$ and known properties of $\phi$. For example, since $\phi$ is known to be non-degenerate, $S$ is non-degenerate if and only if $T$ is an isomorphism.

The construction is readily generalized to the $n \times m$ case by composing $T: \mathbb{R}^m \to \mathbb{R}^n$ with $\phi$.

---

**Change of basis**

For a fixed matrix $A \in \mathbb{R}^{n \times n}$ the construction above yields two functions: a linear function $T\_A: \mathbb{R}^n \to \mathbb{R}^n$ and a bilinear function $S\_A: \mathbb{R}^n \times \mathbb{R}^n \to \mathbb{R}$. The construction takes place in a fixed basis, but the resulting functions $S$ and $T$ are independent of basis, so it is natural to ask how their matrix representation changes under basis transformations.

It easy to see that the matrix representing a linear function transforms differently than the matrix representing a bilinear function. Let $B$ denote an invertible matrix describing a change of basis. Then

$$
T\_A = T\_{A'}
$$

whenever $A' = B^{-1}AB$, i.e. the matrices representing a fixed linear map are [similar](https://en.wikipedia.org/wiki/Matrix_similarity). On the other hand,

$$
S\_A = S\_{A^{''}}
$$

whenever $A^{''} = B^TAB$, i.e. the matrices representing a fixed bilinear map are [congruent](https://en.wikipedia.org/wiki/Matrix_congruence).

This shows that care must be taken when using matrix representations of linear and bilinear functions. Even when a linear function $T$ and a bilinear function $S$ are represented by the same matrix in one basis, it does not imply that they are represented by the same matrix in another basis (unless the basis transformation is orthogonal).
Given
$$
{\bf y}\_{\,1}
 = \left( {\matrix{ {y\_{1,1} } \cr \vdots \cr {y\_{h,1} } \cr } } \right)
 = {\bf A}\,{\bf x}\_{\,1} 
$$
then
$$
{\bf Y}
 = \left( {\matrix{ {y\_{1,1} } & \cdots & {y\_{1,h} } \cr \vdots & \ddots & \vdots \cr 
 {y\_{h,1} } & \cdots & {y\_{h,h} } \cr } } \right)
 = {\bf A}\,{\bf X}
$$

Therefore
$$
{\bf Y}^{\,T} {\bf Y} = {\bf Y}^{\,T} {\bf A}\,{\bf X}
 = {\bf X}^{\,T} {\bf A}^{\,T} {\bf A}\,{\bf X}
 = \left( {\matrix{ {{\bf y}\_{\,1} \cdot {\bf y}\_{\,1} } & \cdots
 & {{\bf y}\_{\,1} \cdot {\bf y}\_{\,h} } \cr \vdots & \ddots & \vdots \cr 
 {{\bf y}\_{\,h} \cdot {\bf y}\_{\,1} } & \cdots & {{\bf y}\_{\,h} \cdot {\bf y}\_{\,h} } \cr 
 } } \right)
$$