I know generally when you use ze and z just based on whether it sounds right to me but is there any rule?
(Tell me if I get any of these are wrong) For example: ze serem (with cheese) ze mną (with me) z masłem (with butter) z pomidorem (with tomato)
Is there some connection between z and od / ze and ode? For example to say (from Barbara) you'd say 'od Barbary'. But for yourself (from me) you'd say 'ode mnie'. (with Barbara) z Barbarą (with me) ze mną
Also I remember finding out the difference between Witam and Witaj. I recall one was to a group of people and the other to one person. Could you also explain which was which.
"Ze" goes before words, that begin with: z, s, sz, ż, and ź followed by a consonant: e.g. ze zbożem, ze skóry, ze szczegółami, ze żbikiem, ze źrebięciem
The rest goes with "z", even if it begins with "z" or "s" (followed by a vowel): z zamkiem, z samochodem, z chrząszczem So, it should be "z serem".
And one remark: if "z" precedes a voceless consonant, you should pronounce it as "s", otherwise, you get hypercorrect. Anyway, it's easier. So "z serem" is in fact pronounced as "s serem" or "z krzesłem" sounds "s krzesłem".
Grammatically, "Witam" is in the first person singular (sth. like "I welcome you") and "Witaj" is in second person singular imperative (Welcome).
You can say "witam" to anyone, but "witaj" can be said only to one person and informally. Plural form of "witaj" is "witajcie". If you want the formal version, I'd recommand "Witam Pana(1 male)/Panią (1 female)/ Państwa(>1, both male and female)/ Panie (>1 female)/ Panów (>1 male)".
In a sentence like 'Zabrałem twoją książkę z tobie.', I guess the translation with 'z' (or perhaps 'od' + 'ciebie??) would be 'I took your book (from you.)-:)
In English though, a book 'from' you doesn't mean the same thing as 'by' you. Also, Polish may not distinguish between 'of ', 'by' and 'from' as we do in English. But then again, perhaps it does, hey, I'm only a foreigner-:). In German, it's similar, leading to errors when, for example, Germans ask, 'Please, this book is of you?', even, 'This book is from Goethe.' instead of the correct 'by' in both sentences in English, whereas German uses only 'von' to indicate both meanings.
It has something to do with vowel harmony. Ja jestem z Warszawy-I am from Warsaw but jestem ze Szczecina-I am from Stettin.
Again ja jestem z tobą-I am with you but Ty jesteś ze mną-you are with me.
I am not sure if these are good examples but you should get the general drift. Ze is used wherever you get an uncomfortable build up of consonants together.
ze zboża ze mną ze Szczecina the above are the uncomforable cluster of consonats but z mąki z tobą z Warszawy the above are the comforable clusters if consonats;) ze makes it easier to pronounce as it is done in other languages eg. an egg, an apple - although here the cosnonant n in an separates the vowels for easier pronunciation
Why would it be ze psem and not just z psem, the way it is? I have never heard anybody saying ze psem. Again, like gips u nogi, it is simply strange usage of Polish.
From the examples provided above, I suggest the following rule:
Use "ze" before heavy consonant clusters (two or three consonants) where the first consonant sounds similar to s or z, i.e. s, ś, sz, z, ź, ż
That will take care of most cases. As to the exceptions, not covered by this rule, such as "ze mną" (with me) you have a choice: learn them by heart or use "z". Above all, don't get discouraged! (there are much worse things in the lingo than the z/ze dilema :P)