Microsoft has agreed to invest in Uber, according to people with knowledge of the matter, as part of a funding round that values the ride-hailing company at around $51 billion. If the deal is finalized, Microsoft’s contribution would be a substantial amount of the financing, which totals about $1 billion, according to the people, who spoke on the condition of anonymity because the details of the fund-raising are not public. “We filed to authorize this new funding more than two months ago,” an Uber spokeswoman said in a statement. “The filing is available to the public. We aren’t commenting on additional speculation.” A Microsoft spokesman declined to comment. Microsoft’s participation was earlier reported by The Wall Street Journal.