# operator -(Vector3, Vector3)

> Subtracts one vector from another.

## Definition

* **Type:** Operator
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static Vector3 operator -(Vector3 a, Vector3 b)
```

### Parameters

**** (\[Vector3]\(/engine/6000.0/script-reference/unityengine/vector3)): The vector to subtract `b` from.**** (\[Vector3]\(/engine/6000.0/script-reference/unityengine/vector3)): The vector to subtract from `a`.

### Returns

| Type                                                              | Description |
| ----------------------------------------------------------------- | ----------- |
| [Vector3](/engine/6000.0/script-reference/unityengine/vector3.md) |             |

### Remarks

Subtracts each component of `b` from `a`.

### Examples

```csharp
// prints (-5.0,-3.0,-1.0)

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void Example()
    {
        print(new Vector3(1, 2, 3) - new Vector3(6, 5, 4));
    }
}
```
