Perhaps from 'aiyn; where? Hence how? -- how, what, whence, where, whether, which (way).
see HEBREW 'aiyn
H335. ay
[אַי] (, in Syriac in compounds as how ? WSG 120-2; compare Assyrian aiu, who? what?).
1. interrogative adverb where?
a. so with suffix אַיֶּ֫כָּה [a verbal form, see Sta§ 355 b. 3] Genesis 3:9; אַיּוֺ Exodus 2:20, poetry where is he? = he is nowhere Job 14:10; 20:7 (Jeremiah 37:19 read Qr אַיֵּה); אַיָּם Nahum 3:17 (in indirect question) and the place thereof is not known, אַיָּם where they are. Idiomatically, with the suffix anticipating the noun to which it refers (Ew§ 309 c, compare DrSm. i. 21, 14) 2 Kings 19:13 מֶלֶחחֲֿמָת אַיּוֺ where is he, the king of Hamath? ("" Isaiah 37:13 אַיֵּה) 19:12; Micah 7:10. When used alone, or with other adverbs (see below), it is contracted to אֵי Genesis 4:9; Deuteronomy 32:37; 1 Samuel 26:16; Proverbs 31:4 Qr. (The more usual form is אַיֵּה.)
b. strengthened by the enclitic זֶה (see זֶה, 4 אֵיזֶֿה15 where, then ? (never of a person, except Esther 7:5 (late), & only once 1 Kings 22:24 [but see 2 Chronicles 18:23] with a verb) Isaiah 50:1; 66:1 (twice in verse); Jeremiah 6:16, in indirect question 1 Samuel 9:18; in the phrase ֗֗֗ הַדֶּרֶח אֵיזֶֿה where is the way (that) . . . ? 1 Kings 13:12; 2 Kings 3:8; 2 Chronicles 18:23; Job 38:19 a. 24.
2 prefixed to other adverbs or pron., אֵי imparts to them an interrogative force: thus
a. אֵיזֶֿה which (of two or more)? only Ecclesiastes 2:3; 11:6 (late), in indirect question
b. אֵימִֿזֶּה whence ? (מִזֶּה = hence; see below זֶה) Genesis 16:8 בָאתְ אֵימִֿזֶּה 1 Samuel 30:13; 2 Samuel 1:3, 13; Job 2:2; in indirect question Judges 13:6; 1 Samuel 25:11; with substantive annexed 2 Samuel 15:2 אַתָּה עִיר אֵימִֿזֶּה literally whence, as regards city, art thou ? Jonah 1:8.
c. אֵילָֿזֹאת Jeremiah 5:7 upon what ground ? (ᵑ9 super quo? how? With other adverbs, אֵי coalesces into one word, see אֵיפֹה אֵיכָכָה, אֵיכָה,.