Ram

i was just wondering can you mix brands of ram? like say i have a 1024mb ultra stick can i buy a 1024 mb ozz stick? will they work together or does it have to be the same brand?