In short, no. www is not a part of your domain – it’s a subdomain.
However, if you want it to work with or without keying www in the browser, you got to configure your domain correctly. Thus, it would not matter whether the visitor types www.yourdomainname.com or yourdomainname.com. To do so, you will need to set up a 301 redirect.
For example,
If your intended main homepage is www.yourdomainname.com and someone types yourdomainname.com, a 301 redirect will forward them along to www.yourdomainname.com instead.