Explanation:
m = kg. v=m/s. g=m/s^2. h= m
>>1/2mv^2=mgh
>>1/2mv^2=mgh>> kg*(m/s)^2= kg*m/s^2*m
>>1/2mv^2=mgh>> kg*(m/s)^2= kg*m/s^2*m>>kg m^2/s^2=kg m^2/s^2 the fraction 1/2 won't be able to make any changes to to the dimensional expression of energy i.e half of energy is still energy therefore you can neglect the number .
>>kg m^2/s^2=kg m^2/s^2
>>J= J