Yes it matters. If you use a good web host they will allow you to redirect all no-www traffic to the www.
Yeah they both matters if u r having these kind of url for ur website then u should go for SEO freindly 301 redirection method so that ur popularity will not be shared with www and non www urls. U should redirect the non www to www version. As such both the urls are treated individual by the search engine bots.