Optimizing horizontal addition of columns to meet minumum sums for multiple rows Apologies in advance! My math experience only went up to Calc 1 (so long ago) and while I feel like the answer probably exists in countless places across the net I don't know enough terminology and/or a way to word it shortly enough to perform a proper search. Hopefully I can explain this well enough for someone to understand and I'd be sincerely grateful for even a simple link pointing me the right direction. (I have no idea what to even tag this question as.)

Given a 'row and column' chart of values I want to find what minimum total of columns that can be horizontally added together to meet minimum values in particular rows.
For Example:

___|__cA__cB__
rA |   2   1  
rB |   0   3  

If I want a minimum of 10 in rB I want a method that returns $4cB$ and $0cA$.
Alternatively if I am looking for a minimum of 10 in rA and 20 in rB I want a method that returns $2cA + 7cB$. This results in a total of 9 columns added, as opposed to the more inefficient solution of simply summing $10cB$ for a total of 10 columns added.

Thank you for taking the time to read and sorry if this question is a bit silly. I feel like this is a process I should be able to logic my way through but I have just been drawing a blank or hitting dead ends. A friend with more experience in math suggested this might be matrix 'black magic' but that their understanding doesn't cover that.
For what it is worth I am attempting to implement this in Javascript, in case any particular method of solving this lends itself well to programming.
 A: This kind of problem is called "linear programming".

To flesh out my comment into a proper answer: 
In your example, you want to add a multiple of column $A$ to a multiple of column $B$. If you add $a$ times column $A$ and $b$ times column $B$, you end up with totals of $2a + b$ in row $A$ and $3b$ in row $B$. 
This is called taking a linear combination of the column vectors: $$a\begin{bmatrix} 2\\0 \end{bmatrix}+ b\begin{bmatrix}1\\3\end{bmatrix} = \begin{bmatrix} 2a + b\\ 3b\end{bmatrix}.$$ 
Now your constraints "minimum of $10$ in row $A$" and "minimum of $20$ in row $B$" gives you the inequalities \begin{align*} 2a+b&\geq 10\\ 3b&\geq 20\end{align*}
These inequalities have lots of solutions (like $a = 100$, $b = 42$), but you want the "most efficient one". It seems like "most efficient" in your case means the fewest total number of columns added together. That is, you want to minimize the quantity $(a + b)$. 
This is exactly a linear programming problem: Minimize some function in the variables $a$ and $b$, subject to some inequalities which constrain the values of $a$ and $b$. 
Since it seems like you intend the variables $a$ and $b$ to be actual numbers of times you repeatedly add the columns, you might want the additional constraint that $a$ and $b$ have to be natural numbers  (rather than arbitrary real numbers that you scale the columns by). This turns the problem into an integer linear programming problem. 
