I have a matrix A of size 50 X 6 and I have a vector x of size 50 X 1. Assume that all columns of A are orthogonal to each other. I have 2 questions:
What is the best way to check whether x is orthogonal to all columns of A or not ? Only solution I can think of is to iterate through every column of A and calculate dot product.
Suppose that from dot products I find that x is not orthogonal to 3rd and 5th column of A then how can I orthogonalize x with respect to all columns of A ?
Thank you for your attention.
xis orthogonal to every column ofAis, like you say, check every column. Luckily, matrix multiplication is the fastest, most heavily optimized operation in all of numerical computing, soA * xis probably going to be fast enough!xthat's represented by the columns ofA. In code (sorry I only use Numpy/Python but the same ideas apply to Matlab!):