In Scala, we will use the Breeze library to represent a vector. The vector can be represented as a dense or a sparse vector.