How to prove: Orthogonal complement of kernel = Row space? I'm really confused when trying to prove the following:
Suppose $T:\mathbb{R}^n \to \mathbb{R}^m$ is a linear transformation represented by the matrix $A$ whose rows are given by $\{z_1^T,...,z_m^T\}$. Denote by $\mathrm{Ker}(A)$ the kernel of the transformation. I am trying to prove the following.
$$\mathrm{Ker}(A)^\perp = \mathrm{span}\{z_1^T,...,z_m^T\} \tag{1}$$
It should be easy to prove but I'm completely confused at the moment.
Thanks in advance!!
 A: Let us denote by $\mathrm{K}$ the kernel of the linear transformation $T:\mathbb{R^n} \to \mathbb{R^m}$, and by $\mathrm{R}$ the row space defined as $\mathrm{R} := \mathrm{span}\{z_1^T,...,z_m^T\}$. We intend to prove that

$$\mathrm{K}^\perp=\mathrm{R}\,. \tag{1}$$


Lemma 1: "The row space is disjoint from the kernel, and the union of both is the entire space."
$$ \mathbb{R^n} \smallsetminus K = \mathrm{R} \tag{2}$$

Lemma 2: "The row space is orthogonal to the kernel."
$$ \mathrm{K} \perp \mathrm{R} \tag{3}$$

$$$$
Proof of Eqn. (1):
By eqn. (2) and (3), and the fact that the kernel is a subspace in itself, we have the following decomposition of $\mathbb{R^n}$:
$$ \mathbb{R^n} = K \oplus R $$
from which the claim (1) is clear.

$$$$
Proof of Lemma (1):
Let us introduce a basis $\{p_j\}_{_{j\in\{1,...,r\}}}$ for the column space or equivalently the image of the given transformation, $\mathrm{Im}(T)$ and a basis $\{f_i\}_{_{i\in\{1,...,k\}}}$ for the kernel, where $r=\mathrm{rank}(T)$ and $k=\mathrm{dim}(\mathrm{K})$.
Now, by the definition of the image, $$\exists e_j \in \mathbb{R^n}\ \forall j \in \{1,...,r\}: T(e_j)=p_j \,.$$
Or, in other words, $$ \forall i \in \{1,...,m\}, \ z_i^T \cdot e_j = (p_j)^i \tag{4}$$
where $(p_j)^i$ represents the $i$-th entry of the vector $p_j \in \mathrm{Im}(T)$.
Now the claim is that the set $\{e_1,...,e_r,f_1,...,f_k\}$ forms a basis for $\mathbb{R^n}$. This can be proved easily by separately checking for linear independence and span. This is an exercise that I will leave to you (unless if you request otherwise in the comments).
Through a Gram-Schmidt process, let us make this basis orthonormal.
$$ \forall j\in \{1,...,r\}: e_j \mapsto \tilde{e}_j=\frac{e_j - \sum_{k=1}^{j-1} \frac{e_j^T \cdot e_k}{\|e_k\|} e_k}{\|e_j - \sum_{k=1}^{j-1} \frac{e_j^T \cdot e_k}{\|e_k\|} e_k\|} \tag{5}$$
This allows us to rewrite eqn. (4) as follows:
$$ z_i^T \cdot \tilde{e}_j = \frac{(p_j)^i - \sum_{k=1}^{j-1} \frac{e_j^T \cdot e_k}{\|e_k\|} (p_k)^i}{\|e_j - \sum_{k=1}^{j-1} \frac{e_j^T \cdot e_k}{\|e_k\|} e_k\|} \equiv (q_j)^i \tag{6}$$
This allows us to expand each of the row vectors as:
$$ z_i = \sum_{j=1}^{r} (q_j)^i \tilde{e}_j \tag{7}$$
which immediately shows, given our knowledge that $\{e_j\}_{_{j\in\{1,...,r\}}}$ is a basis for $\mathbb{R^n} \smallsetminus K$,
$$ \mathrm{R}=\mathrm{span}\{z_i\}=\mathrm{span}\{\tilde{e}_j\}=\mathbb{R^n} \smallsetminus K \,. \tag{8}$$
This concludes our proof.

$$$$
Proof of Lemma (2):
This is obvious. I will quote the comment of symplectomorphic which gives a vivid sketch of the proof.

If $x$ is in the kernel, then $Ax=0$, which says that the dot product of each row of $A$ with $x$ is zero. Hence $x$ is orthogonal to the rows of $A$, and therefore to the row space.


$$$$
$\tag{Q.E.D.}$
A: It is easy to see that $\ker(A)$ is the orthogonal complement of $\text{row}(A)$, 
since $x\in\ker(A)\iff r_i\cdot x=0$ for every row $r_i$ of A.
Taking orthogonal complements on both sides, and using $(W^{\perp})^{\perp}=W$, gives the result.
A: Hint. Use rank-nullity theorem and that if $W$ is a subspace of a finite-dimensional space $V$, then: $$V=W\oplus W^{\perp}.$$
You should be able to prove that: $$\dim\left(\ker(A)^\perp\right)=\dim(\textrm{im}(A)).$$
Conclude with this equality of dimension and the inclusion you already proved.
A: Suppose that $A$ is the matrix representation of a linear transformation between two vector spaces.
To show that $\text{Ker}(A)^\perp = \text{Im}(A^T)$, we need to show that these two subspaces are equal. Generally we have to show that $\text{Ker}(A)^\perp\subset \text{Im}(A^T)$ and $\text{Im}(A^T)\subset \text{Ker}(A)^\perp$.
$\left(\text{Im}(A^T)\subset\text{Ker}(A)^\perp \right)$:   Assume that $y\in\text{Ker}(A) \Rightarrow Ay = 0$, now multiply the left hand side by any vector of compatible dimensions:
\begin{align*}
 Ay = 0 &\Rightarrow x^TAy = 0\;\; \forall x \\
& \Rightarrow (A^Tx)^Ty = 0
\end{align*}
At this point let $\tilde{x} = A^Tx$, this implies that $\tilde{x}$ is a linear combinations of the rows of $A$, i.e. $\tilde{x}\in\text{Im}(A^T)$.  Therefore  $\forall \tilde{x}\in\text{Im}(A^T)$ we have $\tilde{x}^T y = (A^Tx)^Ty = x^TAy=0$ since $y\in\text{Ker}(A)$.
This implies that $\tilde{x} \in \text{Ker}(A)^\perp$.
We can then think of similar arguments to show the reverse.
