Or you can just google linear algebra vectors and read about them =)
Edit:
Note that openGL does not have vec3, vec4 like in your code. You will have to use a library for that, the best one in my opinion, and the most used one is GLM.
That's because your code is GLSL. It's shaders, right? In GLSL (the code you write for shaders) vec3, vec4, and matrices exist there, but not in the CPU part of openGL. Then you would need a library
http://learnopengl.com has a page where it explains everything about vectors and matrices aswell (matrices are even more important than vectors)