Orthogonal complement $V^\bot$ of the vector space $V=\langle(1,0,2),(3,-1,0)\rangle$ and $V\cap V^\bot$ Consider the inner product defined by polarizing the quadratic form $$q(x,y,z)=x^2-z^2+4xy-2yz$$ on $\mathbb{R}^3$.
Let $V=\langle(1,0,2),(3,-1,0)\rangle$. Could you show me how to find $V^\bot$ and $V\cap V^\bot$? I get $V^\bot=\langle(2,6,1)\rangle$, which doesn't feel right, and don't know how to calculate the intersection. Also, in general, what can we say about the dimension of $W^\bot$ if we know the dimension of $W$?
 A: The symmetric bilinear form that gives rise to your quadratic form $q$ is given by
$$
  b((x_1,y_1,z_1),(x_2,y_2,z_2))=x_1x_2-z_1z_2+2x_1y_2+2y_1x_2-y_1z_2-z_1y_2
$$
Now the conditions of being orthogonal to $(1,0,2)$ and to $(3,-1,0)$ are  respectively given by setting for instance $(x_2,y_2,z_2)$ equal to that vector and equating the resulting expression to$~0$; this respectively gives the equations 
$$ \begin{align}
 x-2z+2y-2y&=0,\\ 3x-2x+6y+z&=0,
\end{align}
$$
or after simplification
$$ \begin{align}
 x\phantom{{}+0y}-2z&=0,\\ x+6y+\phantom0z&=0.
\end{align}
$$
Then $V^\perp$ is spanned by for instance $(4,-1,2)$. It happens that this vector is also in $V$ (it is the sum of the two given vectors spanning $V$), which shows that you are not dealing with an inner product here (which should be positive definite). Indeed $q(4,-1,2)=0$. (Such a vector orthogonal to itself is called an isotropic vector for the bilinear form.)
If $E$ is the whole space, one does have $\dim(V)+\dim(V^\perp)=\dim(E)$ here. But even that is only valid in general provided that that bilinear form is nondegenerate, meaning that no nonzero vector is perpendicular to all vectors. Even though the given bilinear form is indefinite, it is nondegenerate. That can be checked by checking that the Gram matrixof $b$
$$
  \begin{pmatrix}1&2&0\\2&0&-1\\0&-1&1\end{pmatrix}
$$
has nonzero determinant. So $\dim(V)+\dim(V^\perp)=\dim(E)$ could have been expected here.
A: you want to find $(x, y, z)$ so that it is orthogonal to $(1,0, 2)$ and $(3, -1, 0)$
that means $x + 2z = 0, 3x - y = 0$ if the basis of is more complex you will make a matrix made of these vectors as rows and row reduce them to solve for $x,y,z.$ in this example it is easier and we can set $z = -1$ and solve for $x = 2, y = 6$ so that $V^\perp$ is spanned  by $(2, 6, -1).$
the dimension of $W$ and $W^\perp$ should add up to the dimension of the space these are subspaces of.

edit: $\pmatrix{1&0&2&|&a\\3&-1&0&|&b} \rightarrow 
\pmatrix{1 & 0 & 2&|&a\\0&-1&-6&|&-3a + b}$
here $z$ is free variable and set it to $z = -1$. back substitution gives you $y = 6, x = 2$
if you had more than one free variable, you will set one of them to $1$ and the all rest to zero, then cycle through all of the free variables to get that many solutions in $W^\perp$
