what is the relationship between vector spaces and rings? Can you show me an example to show how vector and scalar multiplication works with rings would be really helpful.
 A: The relationship between a ring and its modules is the analogue of the relationship of a field and its vector spaces.
For a field (or even skewfield) $F$, the Cartesian product $F\times F\times \dots\times F$ of finitely many copies of $F$ is a vector space in the ways you are probably familiar with.
There is no reason you can't do this for $R\times R\times\dots\times R$ for a general ring $R$: defining scalar multiplication is exactly the same. 
The deal is that for general rings $R$ you call this a module, and in general there are a lot more modules that don't look like finitely many copies of $R$ (or even infinitely many copies of $R$.) That is why vector spaces are nice: because their structure is completely understood in terms of direct sums of copies of the field/skewfield.
A: You might be interested in algebras over some field (wikipedia article here).  These are vector spaces with a bilinear product.  So they are vector spaces with a multiplication such that addition, mulitplication of elements, and scalar multiplication by elements of the field all work together in the way that they "should".
A: Already there are good answers to your (old) question. But none of them provides examples as you asked. So, let me write another answer to partially fulfill that requirement with focus on "algebras". First, let's unwrap the relevant definitions.

*

*A vector space is a a quadruple $(V,\mathbb{F}, +, .)$ consisting of an abelian group $(V, +)$ and field $\mathbb{F}$ acting on it by scalar multiplication $.: \mathbb{F}\times V \to V.$ This scalar multiplication operation is compatible with vector addition and field addition.

*A ring is a triple $(R, +,\times),$ where $(R, +)$ is an abelian group. And $(R,\times)$ is a monoid (or a semigroup if the ring is non-unital) with both distributive law, i.e., multiplication is bilinear.

As you can see, there are multiple ways to connect these two concepts. One way is replace (weaker) the field in the definition of a vector space by a ring, i.e. $\mathbb{F}\rightsquigarrow R.$ This is exactly the structure of a modules mentioned in other answers. These are everywhere in mathematics. For example: the set of all smooth vector fields defined on a manifold $M$ form a module over the ring of smooth real valued functions $C^{\infty}(M)$ on $M.$
Another way to connect them is $V\rightsquigarrow R.$ Here we need to be bit careful as we need to add some conditions so that ring multiplication is compatible with field multiplication. Otherwise there can be some exotic algebraic behave miserably. So, let's add two more properties to existing structure:

*

*$a(r_1r_2)=(ar_1)r_2=r_1(a r_2)$ for all $a\in\mathbb{F}$ and $r_1, r_2\in R.$

*$(ab)r=a(br)$ for all $a, b\in\mathbb{F}$ and $r\in R.$
Now, we have a vector space equipped with a bilinear product (or ring with a scalar multiplication), known as an (associative and unital) algebra over a field. Form here I will focus on them. There are so many examples for theses in all over the mathematics including:

*

*Square matrices of order $n$ over $\mathbb{F}.$

*Polynomial ring $\mathbb{F}[x].$

*Set of real-valued continuous functions on a topological space $X.$

*Clifford algebras which includes real numbers, complex numbers, bi-complex numbers, quaternions and several other hypercomplex number systems.

*Algebras of linear operators are impotant in functional analysis. There the algebra multiplication is given by the composition of operators.

One can further generalize this to  consider more general concept of an associative algebra over a commutative ring, instead of a field. Or replacing the ordinary ring multiplication by a Lie bracket gives a Lie algebra, which is a non-associative algebra, i.e., ring multiplication is not assumed to be associative. This gadget is specially important is differential geometry to describe algebras of vector fields on a differentiable manifold. In general, non-associative algebras include things like octonion, hyperbolic quaternion and Jordan algebras.
On the other hand, by adding more structure into associative algebras over fields we can obtain rich structures like Banach algebras, C*-algebras,Poisson algebras, Hopf algebras and many more.
A: Every ring $R$ is an $R$-module over itself.  I use the definition $R$-module to be safe, say if $R$ isn't commutative - don't know if you can call that a vector space.  You may be able to replace $R$-module here with vector space is what I'm saying.
Prove that every ring is an $R$-module over itself.
