Note: this site last updated in 2006
An article from "The Molecules of HIV" (c) Dan Stowell
The p17 matrix protein, one of the products of the HIV gag gene, serves a structural function inside mature HIV particles. Units of p17 line the inside of the HIV envelope, helping to anchor the gp41/gp120 "spikes" to the envelope.
Once the HIV core has entered the cell, p17 also serves the function of helping it be transferred into the cell's nucleus. It achieves this because it carries "nuclear localisation signals" (sequences of protein which are recognised by cellular machinery as indicating that it should be transported into the nucleus).