[Mauro Allegranza has answered the question of who introduced the notation $i$ (Euler, followed later by Gauss), so I have changed the title. I have also edited the question in other ways to make it clearer what I am asking.]
A common bit of mathematical folklore states that $i$ was introduced to guard against the fallacy $1=\sqrt{(-1)(-1)}=\sqrt{-1}\sqrt{-1}=-1$. (See for example this question, and this passage from Wikipedia. Note the [citation needed] in the Wikipedia entry.)
This seems plausible to modern mathematicians because of the work of 19th century mathematicians, especially Riemann. We cannot define a (single-valued) square-root function in the entire complex plane satisfying the identity $\sqrt{xy}=\sqrt{x}\sqrt{y}$. (Indeed, the above fallacy, recast, proves that.) So we are naturally suspicious of the expression $\sqrt{-1}$ used to define a value. Which square root is meant, $\pm i$?
However, modern sensibilities are not a reliable guide to the thoughts of 18th century mathematicians. I will try to cast some doubt on the "fallacy-guarding" explanation below, but first let me elucidate my question. An alternate hypothesis is that Euler simply introduced the symbol $i$ for brevity. Perhaps he felt that this fundamental constant deserved a standard name, just as he introduced $e$ for the base of natural logarithms. Is there any documentary evidence to decide between these hypotheses? (For example, if Euler placed a discussion of the above fallacy in close proximity to the introduction $i$, that would be evidence for the "fallacy-guarding" hypothesis.)
I've poked around on the internet, looking for a definitive answer. Searching math.stackexchange with the tags [math-history][complex-numbers] yielded nothing useful. The "Google full text" function applied to Paul J. Nahin's book An Imaginary Tale: The Story of $i$ (with the key "notation") also failed to answer the question.
My reasons for questioning the folklore: First note that introducing $i$ does not unequivocally prevent the fallacy, which can be rewritten $1=\sqrt{(-1)(-1)}=i\cdot i=-1$. A closely related argument is that the notation $\sqrt{-1}$ is inherently ambiguous. However, the notational definition "We will use $\sqrt{-1}$ to denote one of the two square roots of $-1$" is no more ambiguous than "We will use $i$ to denote one of the two square roots of $-1$" . The fallacy lies in the unrestricted use of $\sqrt{xy}=\sqrt{x}\sqrt{y}$, not the use of $\sqrt{-1}$ to stand for an (arbitrarily chosen) square root of $-1$.
There is also a historical reason to question the "fallacy-guarding" hypothesis. The emphasis on single-valued functions was far less prominent in the 18th century. From the Wikipedia article History of the function concept:
Euler's own definition reads:
A function of a variable quantity is an analytic expression composed in any way whatsoever of the variable quantity and numbers or constant quantities.
Euler also allowed multi-valued functions whose values are determined by an implicit equation.
Later Euler gave another definition, although this was apparently intended as a generalization of his previous definition. Sorting out the issues with single-valued vs. multi-valued functions was largely a task of the 19th century, with Dirichlet and Riemann playing prominent roles.
Now, $\sqrt{xy}=\sqrt{x}\sqrt{z}$ is fine as an equation between multi-valued functions: it simply says that the set of values on the left is equal to the set of values on the right (given the obvious definition for the product of two sets of values). Unbridled use of multi-valued equations has its pitfalls, but this concern seems to belong more to the 19th century.
Much of Euler's work was more "formula-centric" than we are used to today. His free-wheeling computations with infinite series are well-known. Although they were (mostly) eventually justified, Euler's standards of rigor were not ours.
For these reasons, I find the "fallacy-guarding" argument about as plausible as the "brevity" argument. Is there any contemporaneous historical evidence to help decide the question?