Is letter "ї" and "і" a matter of ortography?
I wonder if I have to learn by heart which one of these is used in a word.
Makes no difference when pronounced I believe.
You will also need to look into Й й - и pronunciation. See these discussion - they have some interesting commentary.
Also check out the "Related Discussions" listed to the right of these discussions.
For an external discussion, this one seems good: