"In all your dwellings you shall eat matzah" (Exodus 12:20). Why is this said? Because it says, "You shall eat before the LORD your God... the tithe of your grain" (Deuteronomy 14:23). One might hear that if a person brought the second tithe up to Jerusalem, he could fulfill his obligation of matzah with it. And from where do we learn that he does not fulfill it with the showbread, nor with the remnants of meal offerings, nor with the loaves of a thanksgiving offering, nor with a nazirite's wafers, nor with first fruits? Scripture teaches, "In all your dwellings you shall eat matzah" - excluding these, which are not eaten in all dwellings. I might then exclude these but bring in the sponge cakes, the honey cakes, the iskaritin (a light fried batter), the cake of soaked dough, and the ashishah (a rich pressed cake). Scripture teaches, "bread of affliction" (Deuteronomy 16:3) - excluding these, which are not bread of affliction. These are the words of Rabbi Ishmael. But the Sages say: one fulfills the obligation with them and with the second tithe; and what does "bread of affliction" teach? That he should not knead it with wine, nor with oil, nor with any other liquid, but moisten it from all of them only on its surface. Rabbi Eliezer says: one fulfills it with them and with the second tithe; and what does "bread of affliction" teach? Just as a poor man's bread the whole year round - his wife kneads and he heats the oven - so too the matzah, his wife kneads and he heats the oven. Rabbi Yose the Galilean says: behold it says, "You shall eat no leavened bread with it for seven days"; I might hear that even second tithe is included; therefore Scripture teaches, "bread of affliction" - excluding second tithe, which is eaten only in joy.
Which Matzah Fulfills the Duty and the Meaning of Bread of Affliction
Yalkut Shimoni on Torah 205:1
בְּכֹל מוֹשְׁבֹתֵיכֶם תֹּאכְלוּ מַצּוֹת. לָמָּה נֶאֱמַר, לְפִי שֶׁהוּא אוֹמֵר "וְאָכַלְתָּ לִפְנֵי ה' אֱלֹהֶיךָ וְגוֹ' מַעֲשַׂר דְּגָנְךָ", הֲרֵי שֶׁהֶעֱלָה מַעֲשֵׂר שֵׁנִי לִירוּשָׁלַיִם שׁוֹמֵעַ אֲנִי יוֹצֵא בּוֹ מִשּׁוּם מַצּוֹת, וּמִנַּיִן שֶׁאֵין יוֹצֵא לֹא בְּלֶחֶם הַפָּנִים וְלֹא בִּשְׁיָרֵי מְנָחוֹת וְלֹא בְּחַלּוֹת תּוֹדָה וְלֹא בִּרְקִיקֵי נָזִיר וְלֹא בְּבִכּוּרִים, תַּלְמוּד לוֹמַר בְּכֹל מוֹשְׁבֹתֵיכֶם תֹּאכְלוּ מַצּוֹת, יָצְאוּ אֵלּוּ שֶׁאֵינָן נֶאֱכָלִין בְּכָל מוֹשָׁבוֹת, מוֹצִיא אֲנִי אֶת אֵלּוּ [וּמֵבִיא] אֶת הַסּוּפְגָנִין וְאֶת הַדּוּבְשָׁנִין וְהָאַסְקְרִיטִין וְחַלַּת מִשְׁרַת וַאֲשִׁישָׁה, תַּלְמוּד לוֹמַר (שם טז, ג) "לֶחֶם עֹנִי", יָצְאוּ אֵלּוּ שֶׁאֵינָן לֶחֶם עֹנִי, דִּבְרֵי רַבִּי יִשְׁמָעֵאל. וַחֲכָמִים אוֹמְרִים, יוֹצֵא בָּהֶם וּבְמַעֲשֵׂר שֵׁנִי, וּמַה תַּלְמוּד לוֹמַר "לֶחֶם עֹנִי", שֶׁלֹּא יָלוּשׁ לֹא בְּיַיִן וְלֹא בְּשֶׁמֶן וְלֹא בִּשְׁאַר כָּל מַשְׁקִין אֶלָּא מְקַטֵּף הוּא מִכֻּלָּן. רַבִּי אֱלִיעֶזֶר אוֹמֵר, יוֹצֵא בָּהֶן וּבְמַעֲשֵׂר שֵׁנִי, וּמַה תַּלְמוּד לוֹמַר "לֶחֶם עֹנִי", מַה לַּחְמוֹ שֶׁל עָנִי כָּל יְמוֹת הַשָּׁנָה אִשְׁתּוֹ לָשָׁה וְהוּא מַסִּיק בַּתַּנּוּר, אַף מַצָּה אִשְׁתּוֹ לָשָׁה וְהוּא מַסִּיק בַּתַּנּוּר. רַבִּי יוֹסֵי הַגְּלִילִי אוֹמֵר, הֲרֵי הוּא אוֹמֵר "לֹא תֹאכַל עָלָיו חָמֵץ שִׁבְעַת יָמִים" וְגוֹ', שׁוֹמֵעַ אֲנִי אַף מַעֲשֵׂר שֵׁנִי בְּמַשְׁמָע, תַּלְמוּד לוֹמַר "לֶחֶם עֹנִי", יָצָא מַעֲשֵׂר שֵׁנִי שֶׁאֵינוֹ נֶאֱכָל אֶלָּא בְּשִׂמְחָה.