You can BUT ... read the rules...
https://www.irs.gov/faqs/small-business-self-employed-other-business/income-expenses/income-expenses...