Question regarding Vakil's algebraic geometry notes Exercise 1.3 D of Vakil's lecture notes on algebraic geometry asks: 
"Verify that $A \to S^{−1}A$ satisfies the following universal property: 
$S^{−1}A$ is initial among $A$-algebras $B$ where every element of $S$ is sent to an invertible element in $B$. (Recall: the data of “an $A$-algebra $B$” and “a ring map $A \to B$” are the same.) 
Translation: any map $A \to B$ where every element of $S$ is sent to an invertible element must factor uniquely through $A \to S^{−1}A.$"
My question:
I can prove the translation, but I don't entirely understand the first statement. What are the morphisms in the category of $A$-algebras?  Clearly, given the ring map $A\to B_1$, a ring map $B_1 \to B_2$ induces via composition a morphism of $A$-algebras taking the algebra $A\to B_1$ to the algebra $A \to B_2.$ But is it clear that ALL morphisms are of that form?
 A: A map of $A$-algebras in this language is a commutative triangle (which I will draw as a square because it's easier).
$$\begin{array}{ccc}B_1&\to&B_2\\\uparrow&&\uparrow\\A&=&A\end{array}$$
What you are pointing out is that if $B_1$ is an $A$-algebra and $B_2$ is a ring, then any ring map $B_1\to B_2$ can be used to make $B_2$ into an $A$-algebra by composition. But this is not the situation that you are in - you have two $A$-algebras $B_1$ and $B_2$, so they are both rings with fixed ring maps from $A$. So a morphism $B_1\to B_2$ of $A$-algebras is a ring map $B_1\to B_2$ that commutes with the two fixed structure maps from $A$ as in the above (square-looking) triangle.
A: The $A$-algebra $S^{-1}A$ is a member of this category: an element of the multiplicative subset $s \in S$ is a unit as it is inverted by $1/s$. It is furthermore initial among these algebras because the unique morphism$$\overline{\varphi}: S^{-1}A \to B$$is given by$$\overline{\varphi}\left({r\over{s}}\right) = \varphi(r)\varphi(s)^{-1},$$where $\varphi: A \to B$ is the structure map.
Now, this morphism is unique because if $\psi$ was another morphism extending $i: A \to S^{-1}A$, we would find that$$\psi\left({r\over{s}}\right) = \psi\left({r\over1}\right)\psi\left({1\over{s}}\right) = \varphi(r)\varphi(s)^{-1},$$as we split the fraction into parts on which $i$ works.
