assuming I have two vectors $A$ and $B$, where $A$ is completely known and from $B$ I know only that the first k components are 0. What is the maximum possible cosine value for the angle between the vectors given these constraints? (best case scenario for the remaining components of B)
All vector components are positive, so that the cosine will be between 0 and 1.
I found the formula $\frac{\sqrt{\sum_{i=k}^{n}{A_i^2}}}{\|A\|}$ myself using logic and experimenting, but I'm looking for a formal proof.
Geometrically it seems logically that the cosine should be highest when all the remaining components of $b$ equal the ones in $a$, but I don't have a proof for this either.
Cosine Similarity formula I'm using: $\cos(\theta) = {A \cdot B \over \|A\| \|B\|} = \frac{ \sum_{i=1}^{n}{A_i \times B_i} }{ \sqrt{\sum_{i=1}^{n}{(A_i)^2}} \times \sqrt{\sum_{i=1}^{n}{(B_i)^2}} }$