Newtonian mechanics vector notation

hi, in my newtonian mechanics notes vectors like speed v and a lot of forces are expressed as trigonometric combinations of unit vectors i and j. for example, v is often described as v= vsinxj + vcosxi, or sometimes a force pointing in a different direction might be mg= -mgsinxi + mgcosxj, where x is the anngle involved in the question. im not really sure how this notation is derived and i need to learn before my exam. does anyone have any explanation on how to express vectors in this way? thanks for your help, cheers