I have a function $f(A,B)$ that maps a pair of two (tall) matrices, $A$ and $B$, to a scalar cost that I want to minimize. $A$ and $B$ both have $K$ columns. I also want to impose a set of equality constraints, s.t. $\text{exp}(A)^T \text{exp}(B)=J_K$, where $J_K$ is the $K\times K$ matrix of ones. In other words, for every pair of columns in $\text{exp}(A)$ and $\text{exp}(B)$, the dot product of these columns must equal 1.
How would you approach this problem? I've been looking into different kinds of constrained optimization techniques but I haven't managed to get a good sense of which (if any) would be the most promising for my setting.
Edit: To clarify, the $\text{exp}$ function is applied entry-wise to these matrices. An example of a solution that satisfies the constraints is: $$ A = \log \left( \frac{1}{12} \begin{bmatrix} 11 & 1\\ 11 & 1\\ 1 & 11\\ 1 & 11 \end{bmatrix} \right), \text{ } B = \log \left( \frac{1}{12} \begin{bmatrix} 11 & 1\\ 1 & 11\\ 11 & 1\\ 1 & 11 \end{bmatrix} \right) $$ (where the $\log$ function is also applied element-wise.)
If it helps, you can assume that $f$ has the following form: $$ f(A,B) = -(\sum_i {\vec{x}^T}^{(i)} A\vec{y}^{(i)} + {\vec{x}^T}^{(i)} B\vec{z}^{(i)} ) $$ where $\vec{x}$, $\vec{y}$, and $\vec{z}$ are all strictly non-negative column vectors, which happen have the further property that $\vec{x}^T\vec{1}=\vec{y}^T\vec{1}=\vec{z}^T\vec{1}=1$ (i.e. the sum of the entries of each vector equals 1 - not sure if this is relevant but I'll mention it just in case it is). $i$ indexes separate instances of these vectors that we sum over.